diff --git a/.github/workflows/pr-example.yml b/.github/workflows/pr-example.yml index 3f4d13d86160..e69804295944 100644 --- a/.github/workflows/pr-example.yml +++ b/.github/workflows/pr-example.yml @@ -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 diff --git a/.github/workflows/pr-gate.yml b/.github/workflows/pr-gate.yml index 5ae60dc50b9f..1bfbc7c2e1e6 100644 --- a/.github/workflows/pr-gate.yml +++ b/.github/workflows/pr-gate.yml @@ -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 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 904ddf8362ee..3ec28eba9d20 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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: