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/audit-api-spec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ on:
branches:
- master
- rel/**
merge_group:
types: [checks_requested]

env:
STATIC_ANALYSIS_BOT_APP_ID: 1819979
Expand All @@ -16,7 +18,7 @@ jobs:
- name: Checkout PR
uses: actions/checkout@v6
with:
ref: ${{ github.event.pull_request.head.sha }}
ref: ${{ github.event.pull_request.head.sha || github.sha }}

- name: Setup Node.js
uses: actions/setup-node@v6
Expand Down Expand Up @@ -68,13 +70,13 @@ jobs:
- name: Checkout PR
uses: actions/checkout@v6
with:
ref: ${{ github.event.pull_request.head.sha }}
ref: ${{ github.event.pull_request.head.sha || github.sha }}
fetch-depth: 0

- name: Find and checkout merge base
run: |
git fetch origin ${{ github.event.pull_request.base.ref }}
MERGE_BASE=$(git merge-base HEAD origin/${{ github.event.pull_request.base.ref }})
git fetch origin ${{ github.event.pull_request.base.ref || 'master' }}
MERGE_BASE=$(git merge-base HEAD origin/${{ github.event.pull_request.base.ref || 'master' }})
echo "Merge base commit: $MERGE_BASE"
git checkout $MERGE_BASE

Expand Down Expand Up @@ -158,7 +160,7 @@ jobs:
- name: Checkout PR head for ruleset
uses: actions/checkout@v6
with:
ref: ${{ github.event.pull_request.head.sha }}
ref: ${{ github.event.pull_request.head.sha || github.sha }}

- name: Download head API spec artifact
uses: actions/download-artifact@v8
Expand Down
28 changes: 15 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ on:
branches:
- master
- rel/**
merge_group:
types: [checks_requested]

workflow_dispatch:

Expand All @@ -19,8 +21,8 @@ env:

jobs:
# Detect which file groups changed so downstream jobs can skip when irrelevant.
# Only runs on pull_request — on push/workflow_dispatch it is skipped, which causes
# downstream jobs (via `needs.changes.result == 'skipped'`) to run unconditionally.
# Only runs on pull_request — on push/workflow_dispatch/merge_group it is skipped,
# which causes downstream jobs (via `needs.changes.result == 'skipped'`) to run unconditionally.
changes:
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
Expand Down Expand Up @@ -66,7 +68,7 @@ jobs:

- uses: actions/checkout@v6
with:
ref: ${{ github.event.pull_request.head.sha }}
ref: ${{ github.event.pull_request.head.sha || github.sha }}
fetch-depth: 0

- name: Setup node:${{ matrix.node-version }}
Expand All @@ -85,7 +87,7 @@ jobs:

- name: Fetch Base Ref
run: |
git fetch origin $GITHUB_BASE_REF
git fetch origin ${GITHUB_BASE_REF:-master}

- name: restore lerna dependencies
id: lerna-cache
Expand Down Expand Up @@ -136,7 +138,7 @@ jobs:

- uses: actions/checkout@v6
with:
ref: ${{ github.event.pull_request.head.sha }}
ref: ${{ github.event.pull_request.head.sha || github.sha }}

- name: Setup node 20
uses: actions/setup-node@v6
Expand Down Expand Up @@ -165,10 +167,10 @@ jobs:
run: yarn run check-fmt

- name: Lint Commit Messages
if: matrix.check == 'commit-lint'
if: matrix.check == 'commit-lint' && github.event_name != 'merge_group'
run: |
git fetch --unshallow origin $GITHUB_BASE_REF
GITHUB_REPO_BRANCH=$GITHUB_BASE_REF yarn run check-commits
git fetch --unshallow origin ${GITHUB_BASE_REF:-master}
GITHUB_REPO_BRANCH=${GITHUB_BASE_REF:-master} yarn run check-commits

- name: Check Package Dependencies
if: matrix.check == 'dependencies'
Expand All @@ -193,7 +195,7 @@ jobs:

- uses: actions/checkout@v6
with:
ref: ${{ github.event.pull_request.head.sha }}
ref: ${{ github.event.pull_request.head.sha || github.sha }}

- name: Setup node 20
uses: actions/setup-node@v6
Expand Down Expand Up @@ -287,7 +289,7 @@ jobs:
steps:
- uses: actions/checkout@v6
with:
ref: ${{ github.event.pull_request.head.sha }}
ref: ${{ github.event.pull_request.head.sha || github.sha }}

- name: Generate build info
id: build-info
Expand Down Expand Up @@ -361,7 +363,7 @@ jobs:
steps:
- uses: actions/checkout@v6
with:
ref: ${{ github.event.pull_request.head.sha }}
ref: ${{ github.event.pull_request.head.sha || github.sha }}

- name: Verify argon2 vendor integrity
run: modules/argon2/scripts/verify-vendor.sh
Expand All @@ -372,7 +374,7 @@ jobs:
steps:
- uses: actions/checkout@v6
with:
ref: ${{ github.event.pull_request.head.sha }}
ref: ${{ github.event.pull_request.head.sha || github.sha }}

- name: Verify all packages exist on npm
uses: ./.github/actions/verify-npm-packages
Expand All @@ -389,7 +391,7 @@ jobs:

- uses: actions/checkout@v6
with:
ref: ${{ github.event.pull_request.head.sha }}
ref: ${{ github.event.pull_request.head.sha || github.sha }}

- name: Setup node 22
uses: actions/setup-node@v6
Expand Down