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
9 changes: 7 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@ on:
permissions:
contents: read

# Only runs that will do work share the group, so a skipped stale
# workflow_run cannot cancel or replace the run for the current commit.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
group: ${{ github.workflow }}-${{ (github.event_name != 'workflow_run' || (github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.head_sha == github.sha)) && github.ref || github.run_id }}
cancel-in-progress: true

jobs:
Expand All @@ -22,11 +24,14 @@ jobs:
timeout-minutes: 10
if: >-
github.event_name == 'pull_request' ||
github.event.workflow_run.conclusion == 'success'
(github.event.workflow_run.conclusion == 'success' &&
github.event.workflow_run.head_sha == github.sha)

steps:
- name: Checkout code
uses: actions/checkout@v7
with:
ref: ${{ github.event.workflow_run.head_sha }}

- name: Setup pnpm
uses: pnpm/action-setup@v6
Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,22 @@ permissions:
pull-requests: write
id-token: write # Required for OIDC

concurrency: ${{ github.workflow }}-${{ github.ref }}
# Only runs that will do work share the group, so a skipped stale
# workflow_run cannot cancel or replace the run for the current commit.
concurrency: ${{ github.workflow }}-${{ (github.event_name != 'workflow_run' || (github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.head_sha == github.sha)) && github.ref || github.run_id }}

jobs:
release:
runs-on: ubuntu-latest
timeout-minutes: 15
if: ${{ github.event.workflow_run.conclusion == 'success' }}
if: >-
github.event.workflow_run.conclusion == 'success' &&
github.event.workflow_run.head_sha == github.sha
steps:
- name: Checkout code
uses: actions/checkout@v7
with:
ref: ${{ github.event.workflow_run.head_sha }}
fetch-depth: 0

# Setup Node.js to enable trusted publishing with OIDC authentication.
Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@ on:
permissions:
contents: read

# Only runs that will do work share the group, so a skipped stale
# workflow_run cannot cancel or replace the run for the current commit.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
group: ${{ github.workflow }}-${{ (github.event_name != 'workflow_run' || (github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.head_sha == github.sha)) && github.ref || github.run_id }}
cancel-in-progress: true

jobs:
Expand All @@ -23,7 +25,8 @@ jobs:
timeout-minutes: 10
if: >-
github.event_name == 'pull_request' ||
github.event.workflow_run.conclusion == 'success'
(github.event.workflow_run.conclusion == 'success' &&
github.event.workflow_run.head_sha == github.sha)
strategy:
fail-fast: false
matrix:
Expand All @@ -36,6 +39,8 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v7
with:
ref: ${{ github.event.workflow_run.head_sha }}

- name: Setup pnpm
uses: pnpm/action-setup@v6
Expand Down
Loading