dns

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

commit 25fba3054cc84263334eaaab0b1ac45e2394744c
parent 4e893150d69f28e3eff09c007dbde4431ce75df9
Author: MTRNord <mtrnord1@gmail.com>
Date:   Wed, 11 Oct 2023 15:24:08 +0200

Add comment to force deployment of changes

Diffstat:
A.github/workflows/force_deploy.yml | 50++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 50 insertions(+), 0 deletions(-)

diff --git a/.github/workflows/force_deploy.yml b/.github/workflows/force_deploy.yml @@ -0,0 +1,49 @@ +--- +name: Force deploy +on: + issue_comment: + types: [created] +jobs: + force_deploy: + permissions: + issues: write + pull-requests: write + contents: read + statuses: write + needs: linting + 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 + uses: xt0rted/pull-request-comment-branch@v2 + id: comment-branch + - name: Set commit status as pending + uses: myrotvorets/set-commit-status-action@v2 + with: + status: pending + context: Force deploying changes + sha: ${{ steps.comment-branch.outputs.head_sha }} + - uses: actions/checkout@v3 + with: + ref: ${{ steps.comment-branch.outputs.head_ref }} + - uses: actions/setup-python@v4 + with: + python-version: '3.12' + - run: pip install -r requirements.txt + - uses: solvaholic/octodns-sync@main + with: + config_path: config/production.yaml + force: "Yes" + doit: --doit + env: + POWERDNS_API_KEY_NS1: ${{ secrets.POWERDNS_API_KEY_NS1 }} + POWERDNS_API_KEY_NS2: ${{ secrets.POWERDNS_API_KEY_NS2 }} + POWERDNS_API_KEY_NS3: ${{ secrets.POWERDNS_API_KEY_NS3 }} + + - name: Set final commit status + uses: myrotvorets/set-commit-status-action@v2 + if: always() + with: + sha: ${{ steps.comment-branch.outputs.head_sha }} + status: ${{ job.status }} + context: Force deploying changes +\ No newline at end of file