diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index f84f609..daec2d8 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -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/comment-on-pr@v1.3.0 + 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