Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add authorize job which requires externally created PRs to be approve… #883

Merged
merged 3 commits into from
Jan 15, 2025
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
17 changes: 15 additions & 2 deletions .github/workflows/build_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,14 @@ env:
REGISTRY_REPO: 'oci://ghcr.io/k0rdent/kcm/charts-ci'

jobs:
authorize:
environment:
${{ (github.event_name == 'pull_request_target' &&
github.event.pull_request.head.repo.full_name != github.repository) &&
'external' || 'internal' }}
runs-on: ubuntu-latest
steps:
- run: echo ✓
build:
concurrency:
group: build-${{ github.head_ref || github.run_id }}
Expand Down Expand Up @@ -131,7 +139,9 @@ jobs:
name: E2E Cloud Providers
runs-on: ubuntu-latest
if: ${{ contains( github.event.pull_request.labels.*.name, 'test e2e') }}
needs: build
needs:
- authorize
- build
concurrency:
group: cloud-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
Expand Down Expand Up @@ -181,7 +191,9 @@ jobs:
name: E2E On-Prem Providers
runs-on: self-hosted
if: ${{ contains( github.event.pull_request.labels.*.name, 'test e2e') }}
needs: build
needs:
- authorize
- build
concurrency:
group: onprem-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
Expand Down Expand Up @@ -235,6 +247,7 @@ jobs:
needs:
- build
- provider-cloud-e2etest
- authorize
runs-on: ubuntu-latest
if: ${{ always() && !contains(needs.provider-cloud-e2etest.result, 'skipped') && contains(needs.build.result, 'success') }}
timeout-minutes: 15
Expand Down
Loading