Skip to content

Commit

Permalink
"ci(release): Add killswitch via issues w/ release-blocker label
Browse files Browse the repository at this point in the history
Implements https://app.asana.com/0/1169344595888357/1146357826982899/f which would cancel the workflow (stop the release) when the repo has open issues with the label 'release-blocker'".
  • Loading branch information
BYK committed Aug 15, 2020
1 parent 9c8e2a2 commit cf350bd
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ jobs:
runs-on: ubuntu-latest
name: "Release a new version"
steps:
- id: killswitch
if: ${{ !github.event.inputs.force }}
run: |
if curl -s "https://api.github.com/repos/$GITHUB_REPOSITORY/issues?state=open&labels=release-blocker" | grep -Pzvo '\[[\s\n\r]*\]'; then
curl -X POST -H 'Accept: application/vnd.github.v3+json' -H 'Authorization: token ${{ secrets.GITHUB_TOKEN }}' https://api.github.com/repos/$GITHUB_REPOSITORY/actions/runs/${{ github.run_id }}/cancel
fi
- id: calver
if: ${{ !github.event.inputs.version }}
run: |
Expand Down

0 comments on commit cf350bd

Please sign in to comment.