Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove unused workflow input
Browse files Browse the repository at this point in the history
LauraBeatris committed Dec 2, 2024
1 parent 666953d commit 0808470
Showing 2 changed files with 15 additions and 25 deletions.
2 changes: 2 additions & 0 deletions .changeset/nine-grapes-promise.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
38 changes: 13 additions & 25 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -2,13 +2,8 @@ name: CI

on:
workflow_dispatch:
inputs:
run_integration_tests:
description: 'Run integration tests'
type: boolean
default: false
merge_group:
pull_request:
pull_request_target:
branches:
- main
- release/v4
@@ -18,7 +13,17 @@ concurrency:
cancel-in-progress: true

jobs:
approve:
name: Require approval for external contribution
runs-on: ubuntu-latest
environment:
name: approve_external_contribution
steps:
- name: Confirm external contribution
run: if [[ "${{ github.event.pull_request.head.repo.fork }}" == "true" ]]; then echo "For security reasons, all pull requests from external forks need to be approved first before running any automated CI." && exit 1; else echo 'Skipping' && exit 0; fi

formatting-linting:
needs: [approve]
name: Formatting, linting & changeset checks
runs-on: 'blacksmith-8vcpu-ubuntu-2204'
timeout-minutes: ${{ vars.TIMEOUT_MINUTES_NORMAL && fromJSON(vars.TIMEOUT_MINUTES_NORMAL) || 10 }}
@@ -85,6 +90,7 @@ jobs:
retention-days: 5

unit-tests:
needs: [approve]
name: Unit Tests
runs-on: 'blacksmith-8vcpu-ubuntu-2204'
timeout-minutes: ${{ vars.TIMEOUT_MINUTES_NORMAL && fromJSON(vars.TIMEOUT_MINUTES_NORMAL) || 10 }}
@@ -136,6 +142,7 @@ jobs:
retention-days: 5

integration-tests:
needs: [approve]
name: Integration Tests
runs-on: 'blacksmith-8vcpu-ubuntu-2204'
timeout-minutes: ${{ vars.TIMEOUT_MINUTES_LONG && fromJSON(vars.TIMEOUT_MINUTES_LONG) || 15 }}
@@ -157,30 +164,11 @@ jobs:
next-version: '15'

steps:
# Skip integration tests from fork PRs to prevent secret exfiltration
- name: Get User Permission
id: checkAccess
uses: actions-cool/check-user-permission@v2
with:
require: write
username: ${{ github.triggering_actor }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Check User Permission
if: steps.checkAccess.outputs.require-result == 'false'
run: |
echo "${{ github.triggering_actor }} does not have permissions on this repo."
echo "Current permission level is ${{ steps.checkAccess.outputs.user-permission }}"
echo "Job originally triggered by ${{ github.actor }}"
exit 1
- name: Checkout Repo
uses: actions/checkout@v4
with:
fetch-depth: 0
show-progress: false
# We must first verify the user permissions before checking out PR code
ref: ${{ github.event.pull_request.head.sha }}

- name: Setup
id: config

0 comments on commit 0808470

Please sign in to comment.