-
Notifications
You must be signed in to change notification settings - Fork 2
52 lines (45 loc) · 1.49 KB
/
deploy.yml
File metadata and controls
52 lines (45 loc) · 1.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: deploy
on:
workflow_dispatch:
workflow_run:
workflows:
- Build mod-rs
branches:
- master
types:
- completed
env:
K8S_NAMESPACE: 'reshare'
K8S_DEPLOYMENT: 'mod-rs-latest'
jobs:
deploy:
if: ${{ github.event_name == 'workflow_dispatch' || (github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success') }}
runs-on: ubuntu-latest
steps:
- name: checkout module
uses: actions/checkout@v5
- name: Deactivate mod-rs
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/kubectl@v1.34.1
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 180
shell: bash
- name: Reactivate mod-rs
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"