Skip to content

hold-command

hold-command #60

Workflow file for this run

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@v4
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@v4
with:
token: ${{ secrets.CI_TOKEN }}
comment-id: ${{ github.event.client_payload.github.payload.comment.id }}
reactions: hooray