unhold-command #45
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: Manage the hold label | |
on: | |
repository_dispatch: | |
types: | |
- hold-command | |
- unhold-command | |
jobs: | |
hold: | |
name: Add hold label | |
runs-on: ubuntu-latest | |
if: github.event.action == 'hold-command' | |
steps: | |
- name: Add the hold label to avoid merging | |
uses: actions-ecosystem/action-add-labels@v1 | |
with: | |
github_token: "${{ secrets.CI_TOKEN }}" | |
number: ${{ github.event.client_payload.github.payload.issue.number }} | |
labels: hold | |
- name: Report status as reaction | |
uses: peter-evans/create-or-update-comment@v3 | |
with: | |
token: ${{ secrets.CI_TOKEN }} | |
comment-id: ${{ github.event.client_payload.github.payload.comment.id }} | |
reactions: hooray | |
unhold: | |
name: Remove the hold label | |
runs-on: ubuntu-latest | |
if: github.event.action == 'unhold-command' | |
steps: | |
- name: Remove the hold label to allow merging | |
uses: actions-ecosystem/action-remove-labels@v1 | |
with: | |
github_token: "${{ secrets.CI_TOKEN }}" | |
number: ${{ github.event.client_payload.github.payload.issue.number }} | |
labels: hold | |
- name: Report status as reaction | |
uses: peter-evans/create-or-update-comment@v3 | |
with: | |
token: ${{ secrets.CI_TOKEN }} | |
comment-id: ${{ github.event.client_payload.github.payload.comment.id }} | |
reactions: hooray |