deploy #8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: deploy | |
on: | |
workflow_dispatch: | |
env: | |
K8S_NAMESPACE: 'reshare' | |
K8S_DEPLOYMENT: 'mod-directory-latest' | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout module | |
uses: actions/checkout@v4 | |
- name: Deactivate mod-directory | |
run: | | |
/usr/bin/python3 .github/workflows/scripts/reenable.py \ | |
-a "disable" \ | |
-o "https://okapi-reshare-1.folio-dev-us-east-1-1.folio-dev.indexdata.com" \ | |
-u "okapi_admin" \ | |
-p ${{ secrets.OKAPI_ADMIN_PW }} \ | |
- name: Deploy latest to K8s | |
uses: actions-hub/[email protected] | |
env: | |
KUBE_CONFIG: ${{ secrets.RESHARE_DEV_SA_KUBECONFIG }} | |
with: | |
args: | |
-n ${{ env.K8S_NAMESPACE }} rollout restart deployment ${{ env.K8S_DEPLOYMENT }} | |
- name: Wait for new image to come up | |
run: sleep 300 | |
shell: bash | |
- name: Reactivate mod-directory | |
run: | | |
/usr/bin/python3 .github/workflows/scripts/reenable.py \ | |
-a "enable" \ | |
-o "https://okapi-reshare-1.folio-dev-us-east-1-1.folio-dev.indexdata.com" \ | |
-u "okapi_admin" \ | |
-p ${{ secrets.OKAPI_ADMIN_PW }} \ | |
-r "https://registry.reshare-dev.indexdata.com" |