Skip to content
Merged
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
26 changes: 20 additions & 6 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ name: CI

on:
pull_request:
merge_group:
types: [checks_requested]
push:
branches:
- main
Expand All @@ -17,16 +19,27 @@ jobs:
contents: read
pull-requests: read
outputs:
go: ${{ steps.filter.outputs.go }}
workflows: ${{ steps.filter.outputs.workflows }}
publish: ${{ steps.filter.outputs.publish }}
go: ${{ steps.merge_group_defaults.outputs.go || steps.filter.outputs.go }}
workflows: ${{ steps.merge_group_defaults.outputs.workflows || steps.filter.outputs.workflows }}
publish: ${{ steps.merge_group_defaults.outputs.publish || steps.filter.outputs.publish }}
steps:
- name: Checkout
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
with:
persist-credentials: false

- name: Set merge-group defaults
if: github.event_name == 'merge_group'
id: merge_group_defaults
run: |
{
echo "go=true"
echo "workflows=true"
echo "publish=false"
} >> "$GITHUB_OUTPUT"

- name: Detect changed paths
if: github.event_name != 'merge_group'
id: filter
uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
with:
Expand All @@ -51,7 +64,7 @@ jobs:

lint:
needs: changes
if: needs.changes.outputs.go == 'true'
if: github.event_name == 'merge_group' || needs.changes.outputs.go == 'true'
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand Down Expand Up @@ -88,7 +101,7 @@ jobs:

test:
needs: changes
if: needs.changes.outputs.go == 'true'
if: github.event_name == 'merge_group' || needs.changes.outputs.go == 'true'
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand Down Expand Up @@ -121,7 +134,7 @@ jobs:
lint-actions:
name: Lint GitHub Actions
needs: changes
if: needs.changes.outputs.workflows == 'true'
if: github.event_name == 'merge_group' || needs.changes.outputs.workflows == 'true'
runs-on: ubuntu-latest
permissions:
contents: read
Expand All @@ -144,6 +157,7 @@ jobs:
uses: zizmorcore/zizmor-action@0dce2577a4760a2749d8cfb7a84b7d5585ebcb7d # v0.5.0
with:
advanced-security: false
online-audits: false
inputs: .github/workflows

codex-comments:
Expand Down