-
Notifications
You must be signed in to change notification settings - Fork 119
49 lines (45 loc) · 1.83 KB
/
push-e2e-integrated-tests.yaml
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
name: Push ~ Run integrated e2e tests
on:
push:
branches:
- master
- release
jobs:
pull-request-info:
if: ${{ !(startsWith(github.event.head_commit.message, format('chore{0} bump versions to', ':')) || startsWith(github.event.head_commit.message, format('chore{0} update Hugo version to', ':'))) }}
runs-on: [ubuntu-latest]
outputs:
author: ${{ steps.author.outputs.result }}
steps:
- uses: actions/github-script@v7
id: author
with:
script: |
const pullRequests = await github.rest.repos.listPullRequestsAssociatedWithCommit({
commit_sha: context.sha,
owner: context.repo.owner,
repo: context.repo.repo,
});
return pullRequests?.data[0]?.user?.login;
result-encoding: string
e2e-integrated:
needs: [pull-request-info]
permissions:
id-token: write
contents: read
pull-requests: read
uses: ./.github/workflows/rw-rush-build-e2e-tests-integrated.yml
secrets: inherit
notify-failed-to-slack:
if: ${{ !cancelled() && needs.e2e-integrated.result == 'failure' }}
needs: [e2e-integrated,pull-request-info]
runs-on: [ubuntu-latest]
steps:
- name: Inform to slack when workflows failed
uses: slackapi/slack-github-action@v1.25.0
with:
channel-id: "#javascript-notifications"
slack-message: ":warning: post merge e2e in *gooddata-sdk-ui* initiated by ${{env.AUTHOR}} encountered an error during execution. Check the *<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|log here>* for further information."
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
AUTHOR: ${{ needs.pull-request-info.outputs.author }}