| 1 | --- |
| 2 | name: Test/Preview DNS changes |
| 3 | |
| 4 | on: |
| 5 | pull_request: |
| 6 | paths: |
| 7 | - "dns/**" |
| 8 | |
| 9 | permissions: {} |
| 10 | |
| 11 | jobs: |
| 12 | dnscontrol: |
| 13 | # only run for local branches |
| 14 | if: github.event.pull_request.head.repo.full_name == github.repository |
| 15 | runs-on: ubuntu-latest |
| 16 | strategy: |
| 17 | fail-fast: false |
| 18 | steps: |
| 19 | - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 |
| 20 | with: |
| 21 | persist-credentials: false |
| 22 | - uses: cachix/install-nix-action@630ae543ea3a38a9a4166f03376c02c50f408342 # v31 |
| 23 | - name: dnscontrol preview |
| 24 | env: |
| 25 | GANDI_TOKEN: "${{ secrets.GANDI_TOKEN }}" # Expires 2027-05-29 |
| 26 | GANDI_SHARING_ID: "${{ secrets.GANDI_SHARING_ID }}" |
| 27 | working-directory: ./dns/ |
| 28 | run: | |
| 29 | nix run --inputs-from . nixpkgs#dnscontrol -- preview |