Skip to content

Commit 7321a97

Browse files
committed
feat: add GitHub Actions workflow to sync ArgoCD on push via Cloudflare WARP
1 parent 57b5bac commit 7321a97

1 file changed

Lines changed: 39 additions & 0 deletions

File tree

.github/workflows/sync.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
name: Sync
3+
4+
on:
5+
push:
6+
branches:
7+
- main
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
sync:
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Connect to Cloudflare WARP
18+
uses: Boostport/setup-cloudflare-warp@v1
19+
with:
20+
organization: makeitworkcloud
21+
auth_client_id: ${{ secrets.CLOUDFLARE_AUTH_CLIENT_ID }}
22+
auth_client_secret: ${{ secrets.CLOUDFLARE_AUTH_CLIENT_SECRET }}
23+
24+
- name: Install OpenShift CLI
25+
uses: redhat-actions/oc-installer@v1
26+
27+
- name: Login to OpenShift
28+
uses: redhat-actions/oc-login@v1
29+
with:
30+
openshift_server_url: ${{ secrets.OPENSHIFT_SERVER_URL }}
31+
openshift_username: ${{ secrets.OPENSHIFT_USERNAME }}
32+
openshift_password: ${{ secrets.OPENSHIFT_PASSWORD }}
33+
insecure_skip_tls_verify: true
34+
35+
- name: Sync ArgoCD application
36+
run: |
37+
oc -n openshift-gitops patch application kustomize-cluster \
38+
--type=merge \
39+
-p '{"operation":{"initiatedBy":{"username":"github-actions"},"sync":{"revision":"${{ github.sha }}"}}}'

0 commit comments

Comments
 (0)