0-6 Update Branch Status #238
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: 0-6 Update Branch Status | |
on: | |
workflow_run: | |
workflows: ["0-6 Cron"] | |
types: | |
- completed | |
jobs: | |
update_status: | |
runs-on: ubuntu-18.04 | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
ref: 0-6 | |
- name: get SHA | |
run: echo "SHA=$(git rev-parse HEAD)" >> $GITHUB_ENV | |
- name: Update commit status | |
run: | | |
env | |
curl \ | |
-X POST \ | |
-H "Authorization: token ${{ secrets.GH_TOKEN }}" \ | |
-H "Accept: application/vnd.github.v3+json" \ | |
https://api.github.com/repos/${{ github.repository }}/statuses/${{ env.SHA }} \ | |
-d '{"state": "${{ github.event.workflow_run.conclusion }}", "context": "Cron"}' |