Skip to content

Commit

Permalink
ci(slack-bot): send messages using GitHub secrets (#103)
Browse files Browse the repository at this point in the history
  • Loading branch information
v1v authored Jun 4, 2024
1 parent c533c69 commit 2e80550
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,24 +55,20 @@ jobs:
run: dotnet nuget push '${{ env.RELEASE_PACKAGES }}' -k ${{secrets.NUGET_REPO_API_KEY}} -s https://api.nuget.org/v3/index.json --skip-duplicate --no-symbols

- if: ${{ success() && github.event_name == 'release' }}
uses: elastic/apm-pipeline-library/.github/actions/slack-message@current
uses: elastic/oblt-actions/slack/[email protected]
with:
url: ${{ secrets.VAULT_ADDR }}
roleId: ${{ secrets.VAULT_ROLE_ID }}
secretId: ${{ secrets.VAULT_SECRET_ID }}
channel: ${{ env.SLACK_CHANNEL }}
bot-token: ${{ secrets.SLACK_BOT_TOKEN }}
channel-id: ${{ env.SLACK_CHANNEL }}
message: |
:large_green_circle: [${{ github.repository }}] Release *${{ github.ref_name }}* published.
Build: (<${{ env.JOB_URL }}|here>)
Release URL: (<https://github.com/${{ github.repository }}/releases/tag/${{ github.ref_name }}|${{ github.ref_name }}>)
- if: ${{ failure() && github.event_name == 'release' }}
uses: elastic/apm-pipeline-library/.github/actions/slack-message@current
uses: elastic/oblt-actions/slack/[email protected]
with:
url: ${{ secrets.VAULT_ADDR }}
roleId: ${{ secrets.VAULT_ROLE_ID }}
secretId: ${{ secrets.VAULT_SECRET_ID }}
channel: ${{ env.SLACK_CHANNEL }}
bot-token: ${{ secrets.SLACK_BOT_TOKEN }}
channel-id: ${{ env.SLACK_CHANNEL }}
message: |
:large_yellow_circle: [${{ github.repository }}] Release *${{ github.ref_name }}* could not be published.
Build: (<${{ env.JOB_URL }}|here>)
Expand Down

0 comments on commit 2e80550

Please sign in to comment.