forked from MetaMask/metamask-mobile
-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (51 loc) · 2.02 KB
/
run-bitrise-e2e-check.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: Run Bitrise E2E Check
on:
issue_comment:
types: [edited, deleted]
pull_request:
types: [opened, reopened, labeled, unlabeled, synchronize]
env:
E2E_LABEL: 'Run Smoke E2E'
E2E_PIPELINE: 'pr_smoke_e2e_pipeline'
WORKFLOW_NAME: 'run-bitrise-e2e-check'
jobs:
is-fork-pull-request:
name: Determine pull request source
if: ${{ github.event.issue.pull_request || github.event_name == 'pull_request' }}
runs-on: ubuntu-latest
outputs:
IS_FORK: ${{ steps.is-fork.outputs.IS_FORK }}
steps:
- uses: actions/checkout@v3
- name: Determine whether this PR is from a fork
id: is-fork
run: echo "IS_FORK=$(gh pr view --json isCrossRepository --jq '.isCrossRepository' "${PR_NUMBER}" )" >> "$GITHUB_OUTPUT"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_NUMBER: ${{ github.event.number || github.event.issue.number }}
run-bitrise-e2e-check:
needs: is-fork-pull-request
runs-on: ubuntu-latest
if: ${{ needs.is-fork-pull-request.outputs.IS_FORK == 'false' }}
permissions:
pull-requests: write
contents: write
checks: write
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
cache: yarn
- name: Install dependencies
run: yarn --immutable
- name: Check Bitrise E2E Status
env:
BITRISE_BUILD_TRIGGER_TOKEN: ${{ secrets.BITRISE_BUILD_TRIGGER_TOKEN }}
BITRISE_APP_ID: ${{ secrets.BITRISE_APP_ID }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# The status check created under this workflow may be bucketed under another check suite in Github actions. This is a result of workflows with the same triggers.
# For example, the status check may show as `CLA Signature Bot / Bitrise E2E Status`. This is a bug on Github's UI. https://github.com/orgs/community/discussions/24616
run: yarn run run-bitrise-e2e-check