diff options
| -rw-r--r-- | .github/workflows/daily_unit_tests_with_nightly_puppet_gem.yaml | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/.github/workflows/daily_unit_tests_with_nightly_puppet_gem.yaml b/.github/workflows/daily_unit_tests_with_nightly_puppet_gem.yaml index b31bf18..303be8c 100644 --- a/.github/workflows/daily_unit_tests_with_nightly_puppet_gem.yaml +++ b/.github/workflows/daily_unit_tests_with_nightly_puppet_gem.yaml @@ -56,3 +56,51 @@ jobs: - name: Run unit tests run: bundle exec rake parallel_spec + + - name: Send Slack notification + if: always() + shell: bash + env: + success: '#43c78a' + failure: '#ed5c5c' + cancelled: '#343434' + run: | + curl -X POST --data-urlencode \ + "payload=\ + {\ + 'channel': '#${{ secrets.SLACK_CHANNEL }}', \ + 'attachments': \ + [\ + {\ + 'author_name': '${{ github.actor }}', \ + 'author_link': 'http://github.com/${{ github.actor }}', \ + 'author_icon': 'http://github.com/${{ github.actor }}.png?size=32', \ + 'color': '${{ env[job.status] }}', \ + 'fields': \ + [\ + {\ + 'title': 'Git reference', \ + 'value': '${{ github.ref }}', \ + 'short': true, \ + },\ + {\ + 'title': 'Event', \ + 'value': '${{ github.event_name }}', \ + 'short': true, \ + },\ + {\ + 'title': 'Workflow', \ + 'value': '<http://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}|${{ github.workflow }}>', \ + },\ + {\ + 'title': ':ci_${{ job.status}}: *${{ github.repository }}*', \ + 'value': 'The *${{ matrix.os_type }} / Puppet${{ matrix.puppet_version }} gem / Ruby ${{ matrix.ruby }}* run finished with status *${{ job.status }}*.', \ + 'short': false, \ + },\ + ],\ + 'footer': ':githublogo: Commit SHA: <http://github.com/${{ github.repository }}/commit/${{ github.sha }}|${{ github.sha }}>', \ + },\ + ],\ + }\ + " \ + ${{ secrets.SLACK_WEBHOOK_URL }} |
