Skip to content

Commit f62660c

Browse files
committed
temp: the plan job with an empty answer about the key, on a pull request event
Dropped before review. Names no secret.
1 parent 711b7ea commit f62660c

1 file changed

Lines changed: 45 additions & 0 deletions

File tree

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Verify device specs proof
2+
3+
on:
4+
pull_request:
5+
6+
permissions:
7+
contents: read
8+
9+
jobs:
10+
plan:
11+
if: ${{ github.head_ref != 'changeset-release/main' }}
12+
runs-on: ubuntu-latest
13+
timeout-minutes: 5
14+
outputs:
15+
run: ${{ steps.plan.outputs.run }}
16+
steps:
17+
- name: Decide whether the device specs can run
18+
id: plan
19+
env:
20+
HEAD_REPOSITORY: ${{ github.event.pull_request.head.repo.full_name || github.repository }}
21+
HAS_PLATFORM_API_KEY: ''
22+
run: |
23+
set -euo pipefail
24+
25+
skip_reason=""
26+
if [ "$HEAD_REPOSITORY" != "$GITHUB_REPOSITORY" ]; then
27+
skip_reason="The device specs did not run. They need a repository secret, and this pull request comes from a fork ($HEAD_REPOSITORY)."
28+
elif [ "$HAS_PLATFORM_API_KEY" != "true" ]; then
29+
skip_reason="The device specs did not run. The MOBILE_VERIFICATION_PLATFORM_API_KEY secret is not set for this repository."
30+
fi
31+
32+
if [ -n "$skip_reason" ]; then
33+
echo "::notice title=Device specs skipped::$skip_reason"
34+
echo "run=false" >> "$GITHUB_OUTPUT"
35+
else
36+
echo "run=true" >> "$GITHUB_OUTPUT"
37+
fi
38+
39+
must-be-skipped:
40+
needs: plan
41+
if: needs.plan.outputs.run == 'true'
42+
runs-on: ubuntu-latest
43+
timeout-minutes: 5
44+
steps:
45+
- run: 'false'

0 commit comments

Comments
 (0)