-
Notifications
You must be signed in to change notification settings - Fork 119
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5709 from gooddata/IMJ-STL-993-post
chore: add post merge notification
- Loading branch information
Showing
1 changed file
with
35 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,11 +6,45 @@ on: | |
- release | ||
|
||
jobs: | ||
pull-request-info: | ||
runs-on: | ||
group: infra1-runners-arc | ||
labels: runners-small | ||
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: | ||
if: ${{ !(startsWith(github.event.head_commit.message, 'Release ') || startsWith(github.event.head_commit.message, format('chore{0} bump versions to', ':'))) }} | ||
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', ':'))) }} | ||
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/[email protected] | ||
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 }} |