Skip to content

Commit

Permalink
Update pull-request.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
jimbrig authored Feb 26, 2024
1 parent a6b1603 commit 61a91d9
Showing 1 changed file with 19 additions and 9 deletions.
28 changes: 19 additions & 9 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,39 +8,49 @@ env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PORKBUN_API_KEY: ${{ secrets.PORKBUN_API_KEY }}
PORKBUN_API_SECRET: ${{ secrets.PORKBUN_API_SECRET }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}

jobs:
dnscontrol:
dnscontrol-check:
if: github.actor!= 'dependabot[bot]'
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
pull-requests: write

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Check
uses: koenrh/dnscontrol-action@v3
uses: is-cool-me/dnscontrol-action@v4.7.3
with:
args: check
config_file: 'dnscontrol.js'
creds_file: 'creds.example.json'

dnscontrol-preview:
if: github.actor!= 'dependabot[bot]'
runs-on: ubuntu-latest
needs: dnscontrol-check

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Preview
id: dnscontrol_preview
uses: koenrh/dnscontrol-action@v3
uses: is-cool-me/dnscontrol-action@v4.7.3
with:
args: preview
config_file: 'dnscontrol.js'
creds_file: 'creds.example.json'

- name: Comment
uses: mshick/add-pr-comment@v2
uses: unsplash/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
message: |
```
${{ steps.dnscontrol_preview.outputs.preview_comment }}
```
repo-token: ${{ secrets.GITHUB_TOKEN }}
allow-repeats: true
check_for_duplicate_msg: false

0 comments on commit 61a91d9

Please sign in to comment.