Skip to content

Commit d0d3e37

Browse files
authored
Add deployment workflow for HA with Kubernetes job
1 parent 9c8f821 commit d0d3e37

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,16 @@ jobs:
2525
git add app/build
2626
git commit -m "ci: update build artifacts" || echo "Nothing to commit"
2727
git push origin build --force
28+
29+
trigger:
30+
runs-on: self-hosted
31+
if: ${{ github.ref == 'refs/heads/deploy-test' || github.ref == 'refs/heads/master' }}
32+
steps:
33+
- uses: actions/checkout@v4
34+
- name: Trigger Job
35+
run: |
36+
NS="default"
37+
JOB="ccl-website-sync-${GITHUB_SHA::7}"
38+
kubectl -n "$NS" delete job -l app=ccl-website,created-by=github-runner --ignore-not-found=true
39+
kubectl -n "$NS" create job "$JOB" --from=cronjob/ccl-website-sync
40+
kubectl -n "$NS" label job "$JOB" app=ccl-website created-by=github-runner --overwrite

0 commit comments

Comments
 (0)