generate_pipeline #11
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: sync-pipeline | |
on: | |
repository_dispatch: | |
types: [generate_pipeline] | |
jobs: | |
ci: | |
runs-on: ubuntu-latest | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: false | |
steps: | |
- name: Check Out The Repository | |
uses: actions/checkout@v2 | |
with: | |
ref: main | |
- name: Grant execute permission for script | |
run: chmod +x ./generate_pipeline.sh | |
- name: Validate | |
run: ./generate_pipeline.sh | |
- name: Pull latest changes | |
run: git pull origin main | |
- name: Commit The New Image Reference | |
uses: stefanzweifel/git-auto-commit-action@v4 | |
with: | |
commit_message: "release :: deploy pipeline" | |
branch: main | |
commit_options: '--no-verify --signoff' | |
repository: . | |
commit_user_name: XQUARE GitOps Bot | |
commit_user_email: [email protected] | |
commit_author: XQUARE GitOps Bot <[email protected]> | |
- name: Wait for 1 second | |
run: sleep 1s | |
- name: Trigger GoCD Pipeline | |
run: | | |
curl -X POST "https://gocd.xquare.app/go/api/pipelines/${{ github.event.client_payload.pipeline_name }}/schedule" \ | |
-H "Accept: application/vnd.go.cd.v1+json" \ | |
-H "X-GoCD-Confirm: xZiORT40ts4+d9wkFNPExsxaTRyloVKgRWAeo+6CU0s=" |