Unverified Commit 65315e54 authored by Wolfgang Walther's avatar Wolfgang Walther
Browse files

workflows: self-test on change

All workflows where it's remotely useful now trigger on a pull_request
event when the workflow file itself is changed. This gives us basic
sanity testing of changes to workflow files itself and reduces the need
for manual tests in forks.
parent c549cc92
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
name: "Check cherry-picks"

on:
  pull_request:
    paths:
      - .github/workflows/check-cherry-picks.yml
  pull_request_target:
    branches:
      - 'release-**'
+3 −0
Original line number Diff line number Diff line
name: Check that files are formatted

on:
  pull_request:
    paths:
      - .github/workflows/check-format.yml
  pull_request_target:
    types: [opened, synchronize, reopened, edited]

+3 −0
Original line number Diff line number Diff line
name: "Check shell"

on:
  pull_request:
    paths:
      - .github/workflows/check-shell.yml
  pull_request_target:
    paths:
      - 'shell.nix'
+7 −0
Original line number Diff line number Diff line
@@ -23,6 +23,9 @@
name: Codeowners v2

on:
  pull_request:
    paths:
      - .github/workflows/codeowners-v2.yml
  pull_request_target:
    types: [opened, ready_for_review, synchronize, reopened, edited]

@@ -64,6 +67,7 @@ jobs:
        run: nix-build base/ci -A codeownersValidator

      - uses: actions/create-github-app-token@df432ceedc7162793a195dd1713ff69aefc7379e # v2.0.6
        if: vars.OWNER_RO_APP_ID
        id: app-token
        with:
          app-id: ${{ vars.OWNER_RO_APP_ID }}
@@ -77,6 +81,7 @@ jobs:
          path: pr

      - name: Validate codeowners
        if: steps.app-token.outputs.token
        run: result/bin/codeowners-validator
        env:
          OWNERS_FILE: pr/${{ env.OWNERS_FILE }}
@@ -99,6 +104,7 @@ jobs:
      - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

      - uses: actions/create-github-app-token@df432ceedc7162793a195dd1713ff69aefc7379e # v2.0.6
        if: vars.OWNER_APP_ID
        id: app-token
        with:
          app-id: ${{ vars.OWNER_APP_ID }}
@@ -111,6 +117,7 @@ jobs:
        run: nix-build ci -A requestReviews

      - name: Request reviews
        if: steps.app-token.outputs.token
        run: result/bin/request-code-owner-reviews.sh ${{ github.repository }} ${{ github.event.number }} "$OWNERS_FILE"
        env:
          GH_TOKEN: ${{ steps.app-token.outputs.token }}
+3 −0
Original line number Diff line number Diff line
name: Eval aliases

on:
  pull_request:
    paths:
      - .github/workflows/eval-aliases.yml
  pull_request_target:

permissions: {}
Loading