-
Notifications
You must be signed in to change notification settings - Fork 121
51 lines (46 loc) · 1.34 KB
/
check-approve.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
name: check-approve
on:
pull_request_review:
types:
- submitted
- dismissed
concurrency:
group: check-approve-${{ github.event.pull_request.number }}
cancel-in-progress: true
jobs:
detect-changes:
if: ${{ github.event.review.state == 'approved' }}
secrets: inherit
permissions:
contents: write
id-token: write
uses: ./.github/workflows/rw-rush-detect-changes.yml
with:
source-branch: ${{ github.event.pull_request.head.sha }}
target-branch: ${{ github.event.pull_request.base.ref }}
package-name: "@gooddata/sdk-ui-tests-e2e"
e2e-stage:
needs: [detect-changes]
if: ${{ needs.detect-changes.outputs.is-changed == 'true' }}
permissions:
id-token: write
contents: read
pull-requests: read
name: e2e-stage
uses: ./.github/workflows/rw-rush-build-e2e-tests.yml
with:
source-ref: ${{ github.event.pull_request.merge_commit_sha }}
secrets: inherit
ready-to-merge-approved:
runs-on:
group: infra1-runners-arc
labels: runners-small
if: ${{ github.event.review.state == 'approved' && !cancelled() }}
needs:
- e2e-stage
steps:
- name: Check if needed jobs succeeded
uses: re-actors/alls-green@release/v1
with:
allowed-skips: ${{ toJSON(needs) }}
jobs: ${{ toJSON(needs) }}