mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-04 10:32:34 +00:00
Maestro (local): skip the lane on pull requests from forks
Secrets are never exposed to pull_request runs from forks, so checkEnv.js throws on MAESTRO_PASSWORD after a full APK build and emulator boot, and the red check is indistinguishable from a real test failure. The existing guard checked github.event.pull_request.fork, a field that does not exist on the pull_request payload (it lives at head.repo.fork), so it was always true. Gate both jobs at job level on head.repo.full_name == github.repository (workflow_dispatch still runs), and drop the dead step-level condition. Fixes #7653 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
@@ -20,6 +20,9 @@ jobs:
|
|||||||
build-apk:
|
build-apk:
|
||||||
name: Build APK
|
name: Build APK
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
# Secrets are not available to pull_request runs from forks, so the Maestro job below
|
||||||
|
# cannot run for them; skip the build too, as its only consumer is that job.
|
||||||
|
if: github.event_name == 'workflow_dispatch' || github.event.pull_request.head.repo.full_name == github.repository
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ format('maestro-build-{0}', github.ref) }}
|
group: ${{ format('maestro-build-{0}', github.ref) }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
@@ -73,13 +76,13 @@ jobs:
|
|||||||
name: Maestro test suite
|
name: Maestro test suite
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [ build-apk ]
|
needs: [ build-apk ]
|
||||||
|
if: github.event_name == 'workflow_dispatch' || github.event.pull_request.head.repo.full_name == github.repository
|
||||||
# Allow only one to run at a time, since they use the same environment.
|
# Allow only one to run at a time, since they use the same environment.
|
||||||
# Otherwise, tests running in parallel can break each other.
|
# Otherwise, tests running in parallel can break each other.
|
||||||
concurrency:
|
concurrency:
|
||||||
group: maestro-test
|
group: maestro-test
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||||
if: (github.event_name == 'pull_request' && github.event.pull_request.fork == null) || github.event_name == 'workflow_dispatch'
|
|
||||||
with:
|
with:
|
||||||
# Ensure we are building the branch and not the branch after being merged on develop
|
# Ensure we are building the branch and not the branch after being merged on develop
|
||||||
# https://github.com/actions/checkout/issues/881
|
# https://github.com/actions/checkout/issues/881
|
||||||
|
|||||||
Reference in New Issue
Block a user