File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22name : Sync
33
44on :
5- push :
6- branches :
7- - main
5+ workflow_run :
6+ workflows : ["Run tests"]
7+ branches : [main]
8+ types :
9+ - completed
810
911permissions :
1012 contents : read
1113
1214jobs :
1315 sync :
1416 runs-on : ubuntu-latest
17+ # Only sync on successful test runs triggered by push to main (not PRs)
18+ if : >-
19+ github.event.workflow_run.conclusion == 'success' &&
20+ github.event.workflow_run.event == 'push' &&
21+ github.event.workflow_run.head_branch == 'main'
1522
1623 steps :
1724 - name : Connect to Cloudflare WARP
3643 run : |
3744 oc -n openshift-gitops patch application kustomize-cluster \
3845 --type=merge \
39- -p '{"operation":{"initiatedBy":{"username":"github-actions"},"sync":{"revision":"${{ github.sha }}"}}}'
46+ -p '{"operation":{"initiatedBy":{"username":"github-actions"},"sync":{"revision":"${{ github.event.workflow_run.head_sha }}"}}}'
You can’t perform that action at this time.
0 commit comments