Skip to content

Commit

Permalink
Trigger syspps deploy upon merge to master. (#9)
Browse files Browse the repository at this point in the history
* Trigger syspps deploy upon merge to master.

* remove deploy workflow input 'branches'
  • Loading branch information
sonoransun authored May 22, 2023
1 parent 9c8eb35 commit 6de6fb3
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions .github/workflows/ci-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,19 +77,16 @@ jobs:
--tag $ECR_REGISTRY/$ECR_REPOSITORY:$BRANCH \
--file ./Dockerfile ./
- name: Kick off Terraform deploy in sysops/ if not Live environment
- name: Kick off Terraform deploy in sysops/
id: sysops-deploy
run: |
BRANCH=$(echo "${GITHUB_REF#refs/*/}" | sed 's/.*\///')
if [[ "$BRANCH" != master ]]; then
curl \
curl \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.SYSOPS_RW_GITHUB_TOKEN }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/meedan/sysops/actions/workflows/deploy_${{ github.event.repository.name }}.yml/dispatches \
-d '{"ref": "master", "inputs": {"git_sha": "${{ github.sha }}", "branch": "'$BRANCH'"}}'
fi
-d '{"ref": "master", "inputs": {"git_sha": "${{ github.sha }}"}}'
- name: Send GitHub Action trigger data to Slack workflow on success
id: slack-api-notify-success
Expand Down

0 comments on commit 6de6fb3

Please sign in to comment.