Merge pull request #312 from Azuro-protocol/dk-branch-1 #232
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: prod | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
trigger: | |
runs-on: ubuntu-latest | |
timeout-minutes: 1 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set short git commit SHA | |
id: vars | |
run: | | |
calculatedSha=$(git rev-parse --short ${{ github.sha }}) | |
echo "COMMIT_SHORT_SHA=$calculatedSha" >> $GITHUB_ENV | |
- name: Trigger Workflow | |
run: | | |
curl -L \ | |
-X POST \ | |
-H "Accept: application/vnd.github+json" \ | |
-H "Authorization: Bearer ${{ secrets.ACCESS_TOKEN }}" \ | |
-H "X-GitHub-Api-Version: 2022-11-28" \ | |
https://api.github.com/repos/${{ secrets.TARGET_REPO_OWNER }}/${{ secrets.TARGET_REPO_NAME }}/dispatches \ | |
-d '{ | |
"event_type":"trigger-workflow", | |
"client_payload":{ | |
"unit":false, | |
"integration":true, | |
"branch":"${{ github.ref_name }}", | |
"env":"prod", | |
"hash":"${{ env.COMMIT_SHORT_SHA }}" | |
} | |
}' |