-
Notifications
You must be signed in to change notification settings - Fork 128
63 lines (57 loc) · 2.15 KB
/
Copy pathcheck.yaml
File metadata and controls
63 lines (57 loc) · 2.15 KB
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
59
60
61
62
63
name: check
on:
pull_request:
branches:
- master
- release
concurrency:
group: check-${{ github.event.pull_request.number }}
cancel-in-progress: true
jobs:
check-sync-label:
permissions:
contents: read
pull-requests: read
name: check-sync-label
uses: ./.github/workflows/rw-block-merge.yaml
with:
commit-sha: ${{ github.event.pull_request.head.sha }}
build-validate-stage:
permissions:
id-token: write
contents: read
pull-requests: read
name: build-validate-stage
uses: ./.github/workflows/rw-rush-build-basic-checks.yml
with:
target-branch: ${{ github.event.pull_request.base.ref }}
secrets: inherit
ready-to-merge:
runs-on:
group: infra1-runners-arc
labels: runners-small
if: ${{ !cancelled() }}
needs:
- check-sync-label
- build-validate-stage
steps:
- name: Check if needed jobs succeeded
uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}
notify-failed-to-slack:
if: ${{ !cancelled() && (needs.check-sync-label.result == 'failure' || needs.build-validate-stage.result == 'failure') && contains(github.event.pull_request.labels.*.name, 'sync') }}
needs:
- check-sync-label
- build-validate-stage
runs-on: [ubuntu-latest]
steps:
- name: Checkout repository
uses: actions/checkout@v7
with:
token: ${{ secrets.TOKEN_GITHUB_YENKINS}}
- name: Inform to slack when workflows failed
uses: ./.github/actions/slack/send-notification
with:
message: ":warning: `check:` *failed* for sync PR #${{ github.event.pull_request.number }}; please check *<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|the logs>*. cc <!subteam^S078DAZRAJW|stellar_fe_engs>"
slack-bot-token: ${{ secrets.SLACK_BOT_TOKEN }}