Skip to content

Commit

Permalink
fix master commit action (#733)
Browse files Browse the repository at this point in the history
* fix master commit action

* fix master GHA

* remove status
  • Loading branch information
darrenvechain authored May 9, 2024
1 parent 0489d6a commit 4fa7366
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/on-master-commit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,16 @@ jobs:
- generate-tags
- lint
- run-unit-tests
- run-e2e-tests
if: always() && (needs.publish-docker-image.result != 'success' || needs.run-unit-tests.result != 'success' || needs.lint.result != 'success' || needs.run-e2e-tests.result != 'success' || needs.license-check.result != 'success')
runs-on: ubuntu-latest
steps:
- name: Get the commit message
id: commit_message
# This is a workaround to get the first line of the commit message. Passing the entire message can cause the payload (JSON) to be invalid.
run: |
echo "commit_message=$(echo ${{ github.event.head_commit.message }} | head -n 1)" >> "$GITHUB_ENV"
- name: Notify Slack
uses: slackapi/[email protected]
env:
Expand All @@ -78,13 +85,11 @@ jobs:
{
"unit-test-status": "${{ needs.run-unit-tests.result != 'success' && ':alert: Failure' || ':white_check_mark: Success' }}",
"docker-publish-status": "${{ needs.publish-docker-image.result != 'success' && ':alert: Failure' || ':white_check_mark: Success' }}",
"commit-message": "${{ github.event.head_commit.message }}",
"commit-message": "${{ env.commit_message }}",
"commit-url": "${{ github.event.head_commit.url }}",
"e2e-test-status": "${{ needs.run-e2e-tests.result != 'success' && ':alert: Failure' || ':white_check_mark: Success' }}",
"branch": "${{ github.ref }}",
"status": "${{ job.status }}",
"repository": "${{ github.repository }}",
"commit-author": "${{ github.event.head_commit.author.name }}",
"lint-status": "${{ needs.lint.result != 'success' && ':alert: Failure' || ':white_check_mark: Success' }}"
}

0 comments on commit 4fa7366

Please sign in to comment.