Skip to content

Commit

Permalink
Merge pull request #5709 from gooddata/IMJ-STL-993-post
Browse files Browse the repository at this point in the history
chore: add post merge notification
  • Loading branch information
pbenes authored Dec 16, 2024
2 parents c7e7e55 + 0418c91 commit d6a737e
Showing 1 changed file with 35 additions and 1 deletion.
36 changes: 35 additions & 1 deletion .github/workflows/push-e2e-integrated-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}

0 comments on commit d6a737e

Please sign in to comment.