dns

DNS Deployment for nordgedanken.dev infra.
git clone git://archive.git.mtrnord.blog/Nordgedanken/dns.git
Log | Files | Refs

commit 4be1677b86aa2c40743786cdc9a4d8c1e05ae638
parent 2f453f45f5e824dc74ad75bb0754dadf4ade129d
Author: MTRNord <mtrnord1@gmail.com>
Date:   Wed, 11 Oct 2023 15:48:34 +0200

Improve handling of commands

Diffstat:
A.github/workflows/commands.yml | 16++++++++++++++++
M.github/workflows/force_deploy.yml | 5++---
M.github/workflows/pullrequest.yml | 6+++---
3 files changed, 21 insertions(+), 6 deletions(-)

diff --git a/.github/workflows/commands.yml b/.github/workflows/commands.yml @@ -0,0 +1,16 @@ +name: Slash Command Dispatch +on: + issue_comment: + types: [created] +jobs: + slashCommandDispatch: + runs-on: ubuntu-latest + steps: + - name: Slash Command Dispatch + uses: peter-evans/slash-command-dispatch@v3 + with: + token: ${{ secrets.PAT }} + permission: maintain + commands: | + force-deploy + validate diff --git a/.github/workflows/force_deploy.yml b/.github/workflows/force_deploy.yml @@ -1,8 +1,8 @@ --- name: Force deploy on: - issue_comment: - types: [created] + repository_dispatch: + types: [force-deploy-command] jobs: force_deploy: permissions: @@ -10,7 +10,6 @@ jobs: pull-requests: write contents: read statuses: write - if: github.event.issue.pull_request && contains(github.event.comment.body, '/force_deploy') && (contains(github.event.comment.author_association, 'OWNER') || contains(github.event.comment.author_association, 'MEMBER')) runs-on: ubuntu-latest steps: - name: Get PR branch diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml @@ -3,8 +3,8 @@ name: Validate on: push: branches: [main] - issue_comment: - types: [created] + repository_dispatch: + types: [validate-command] jobs: linting: runs-on: ubuntu-latest @@ -20,7 +20,7 @@ jobs: contents: read statuses: write needs: linting - if: github.event.issue.pull_request && contains(github.event.comment.body, '/test') && (contains(github.event.comment.author_association, 'OWNER') || contains(github.event.comment.author_association, 'MEMBER')) + if: github.event.client_payload.slash_command runs-on: ubuntu-latest steps: - name: Get PR branch