Skip to content
Open
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
17 changes: 11 additions & 6 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on:
pull_request:
branches: [main]
types: [opened, synchronize, reopened, labeled]
pull_request_target:
branches: [main]
types: [labeled]
merge_group:
workflow_dispatch:
inputs:
Expand All @@ -16,14 +19,14 @@ on:

concurrency:
group: >-
${{ github.workflow }}-${{ github.head_ref || github.ref_name }}${{
${{ github.workflow }}-${{ github.event_name }}-${{ github.head_ref || github.ref_name }}${{
github.event.action == 'labeled' && '-labeled' || ''
}}
cancel-in-progress: true

jobs:
build:
if: github.event.action != 'labeled' || github.event.label.name == 'ok-to-test'
if: github.event_name != 'pull_request_target' && (github.event.action != 'labeled' || github.event.label.name == 'ok-to-test')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -36,7 +39,7 @@ jobs:
run: make build

verify:
if: github.event.action != 'labeled' || github.event.label.name == 'ok-to-test'
if: github.event_name != 'pull_request_target' && (github.event.action != 'labeled' || github.event.label.name == 'ok-to-test')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -49,7 +52,7 @@ jobs:
run: make verify

test:
if: github.event.action != 'labeled' || github.event.label.name == 'ok-to-test'
if: github.event_name != 'pull_request_target' && (github.event.action != 'labeled' || github.event.label.name == 'ok-to-test')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -62,7 +65,7 @@ jobs:
run: make test

test-integration:
if: github.event.action != 'labeled' || github.event.label.name == 'ok-to-test'
if: github.event_name != 'pull_request_target' && (github.event.action != 'labeled' || github.event.label.name == 'ok-to-test')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -76,10 +79,12 @@ jobs:

test-e2e:
if: >-
github.event_name == 'push' || github.event_name == 'merge_group' || (github.event_name == 'workflow_dispatch' && inputs.ok-to-test) || contains(github.event.pull_request.labels.*.name, 'ok-to-test')
github.event_name == 'push' || github.event_name == 'merge_group' || (github.event_name == 'workflow_dispatch' && inputs.ok-to-test) || (github.event_name == 'pull_request_target' && contains(github.event.pull_request.labels.*.name, 'ok-to-test'))
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha || github.sha }}

- uses: actions/setup-go@v5
with:
Expand Down
Loading