With PAT all PRs get tested

This commit is contained in:
Daniel Winkler 2025-08-26 13:01:37 +10:00
commit 26546c7348

View file

@ -1,38 +0,0 @@
name: "Test template PR"
on:
workflow_dispatch: # allows manual triggering
pull_request:
types: [opened, synchronize, reopened]
pull_request_target:
types: [opened, synchronize, reopened]
jobs:
tests:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
token: ${{ secrets.GITHUB_TOKEN }}
- uses: wimpysworld/nothing-but-nix@main
with:
hatchet-protocol: 'carve'
- uses: cachix/install-nix-action@v31
with:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
- uses: DeterminateSystems/magic-nix-cache-action@main
- run: nix build ./templates/n
- run: nix flake check ./templates/n
- name: Comment on PR (if tests fail)
if: failure()
uses: actions/github-script@main
with:
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: '❌ Tests failed on this pull request. Please check the workflow logs for details.'
})