Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions .github/workflows/pr-example.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
name: Example Workflow

on:
workflow_run:
workflows: ["PR Permission Gate"]
types:
- completed
pull_request:
branches:
- main

permissions:
contents: read

concurrency:
group: pr-${{ github.event.pull_request.number }}
cancel-in-progress: true

jobs:
pre-commit:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/pr-gate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@ jobs:
- name: Checkout base branch (safe)
uses: actions/checkout@v5
with:
# checkout the workflow's commit (base branch), not the PR head
ref: ${{ github.event.pull_request.base.sha }}
fetch-depth: 1

- name: Run permission gate (from base)
uses: ./.github/actions/pr-permission-gate
3 changes: 1 addition & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ default_stages:

repos:
- repo: https://github.com/reteps/dockerfmt
# run `pre-commit autoupdate` to pin the version
rev: main
rev: v0.3.9
hooks:
- id: dockerfmt
args:
Expand Down