Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add goreleaser job Slack notifications #2255

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on: # yamllint disable-line rule:truthy
push:
tags:
- "*"
workflow_dispatch:
permissions:
contents: "write"
packages: "write"
Expand Down Expand Up @@ -48,3 +49,11 @@ jobs:
GORELEASER_KEY: "${{ secrets.GORELEASER_KEY }}"
GEMFURY_PUSH_TOKEN: "${{ secrets.GEMFURY_PUSH_TOKEN }}"
SNAPCRAFT_STORE_CREDENTIALS: "${{ secrets.SNAPCRAFT_STORE_CREDENTIALS }}"
- name: "Notify Slack of goreleaser status"
if: "always()"
uses: "8398a7/action-slack@v3"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤔 My first reaction was "Is this a trustworthy GitHub action?".

I found the official Slack GitHub Action, which is verified. Mind sharing why you used action-Slack instead of the official action?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the 8398a7/action-slack is a very popular action. In the past, I've used it because it allows for detailed customisation that might become handy. A quick search shows that projects such as Laravel, Cilium among others, use it, including this GitHub repo
That said, happy to switch it to the one you linked here. Will update shortly!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All good, it was more like I wasn't sure I could trust that action, and if there was any specific features one provided the other didn't, I'd typically favour the official action for security reasons.

with:
status: "${{ job.status }}"
fields: "repo,commit,author,ref,workflow,job,took"
env:
SLACK_WEBHOOK_URL: "${{ secrets.SLACK_WEBHOOK_URL }}"