mirror of
https://github.com/juanfont/headscale.git
synced 2026-11-24 22:26:29 +09:00
52 lines
1.6 KiB
YAML
52 lines
1.6 KiB
YAML
name: "Vouch - Manage by Issue"
|
|
|
|
on:
|
|
issue_comment:
|
|
types: [created]
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: vouch-manage
|
|
cancel-in-progress: false
|
|
|
|
jobs:
|
|
manage:
|
|
# Any comment fires this; only commands should mint the App token.
|
|
if: >-
|
|
contains(github.event.comment.body, '!vouch') ||
|
|
contains(github.event.comment.body, '!denounce') ||
|
|
contains(github.event.comment.body, '!unvouch')
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
# The bot App's token, not GITHUB_TOKEN: the App is the ruleset bypass
|
|
# actor that lets merge-immediately land without review or checks.
|
|
- uses: actions/create-github-app-token@v3.3.0
|
|
id: app
|
|
with:
|
|
client-id: ${{ vars.HEADSCALE_BOT_CLIENT_ID }}
|
|
private-key: ${{ secrets.HEADSCALE_BOT_PRIVATE_KEY }}
|
|
permission-contents: write
|
|
permission-issues: write
|
|
permission-pull-requests: write
|
|
|
|
- uses: actions/checkout@v7.0.1
|
|
with:
|
|
# vouch pushes its branch with it.
|
|
persist-credentials: true
|
|
token: ${{ steps.app.outputs.token }}
|
|
|
|
- uses: mitchellh/vouch/action/manage-by-issue@v1.5.0
|
|
with:
|
|
repo: ${{ github.repository }}
|
|
issue-id: ${{ github.event.issue.number }}
|
|
comment-id: ${{ github.event.comment.id }}
|
|
vouch-keyword: "!vouch"
|
|
denounce-keyword: "!denounce"
|
|
unvouch-keyword: "!unvouch"
|
|
pull-request: "true"
|
|
merge-immediately: "true"
|
|
env:
|
|
GITHUB_TOKEN: ${{ steps.app.outputs.token }}
|