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
2 changes: 2 additions & 0 deletions .changeset/skip-permissions-dispatch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
27 changes: 26 additions & 1 deletion .github/workflows/e2e-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ concurrency:
jobs:
permissions-check:
name: Check Permissions
if: ${{ github.event_name != 'repository_dispatch' }}
runs-on: 'blacksmith-8vcpu-ubuntu-2204'
steps:
- name: Check org membership
Expand Down Expand Up @@ -70,12 +71,35 @@ jobs:
validate-instances:
name: Validate Staging Instances
needs: [permissions-check]
if: ${{ always() && (needs.permissions-check.result == 'success' || needs.permissions-check.result == 'skipped') }}
runs-on: 'blacksmith-8vcpu-ubuntu-2204'
steps:
- name: Normalize inputs
id: inputs
env:
EVENT_NAME: ${{ github.event_name }}
INPUT_REF: ${{ github.event.inputs.ref }}
PAYLOAD_REF: ${{ github.event.client_payload.ref }}
run: |
if [ "$EVENT_NAME" = "workflow_dispatch" ]; then
echo "ref=${INPUT_REF:-main}" >> $GITHUB_OUTPUT
else
echo "ref=${PAYLOAD_REF:-main}" >> $GITHUB_OUTPUT
fi

- name: Validate ref
env:
REF: ${{ steps.inputs.outputs.ref }}
run: |
if [[ ! "$REF" =~ ^(main|release/.*)$ ]]; then
echo "::error::Ref '$REF' is not allowed. Only 'main' and 'release/*' branches are permitted."
exit 1
fi

- name: Checkout Repo
uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.ref || github.event.client_payload.ref || 'main' }}
ref: ${{ steps.inputs.outputs.ref }}
sparse-checkout: scripts/validate-staging-instances.mjs
fetch-depth: 1

Expand All @@ -88,6 +112,7 @@ jobs:
integration-tests:
name: Integration Tests (${{ matrix.test-name }}, ${{ matrix.test-project }})
needs: [permissions-check]
if: ${{ always() && (needs.permissions-check.result == 'success' || needs.permissions-check.result == 'skipped') }}
runs-on: 'blacksmith-8vcpu-ubuntu-2204'
defaults:
run:
Expand Down
Loading