mirror of
https://github.com/anchore/syft.git
synced 2026-02-12 10:36:45 +01:00
Chore new slack action (#4553)
* chore: new slack action Signed-off-by: Will Murphy <willmurphyscode@users.noreply.github.com> * TEMP: exit 1 to test slack notify Signed-off-by: Will Murphy <willmurphyscode@users.noreply.github.com> * new slack integration everywhere Signed-off-by: Will Murphy <willmurphyscode@users.noreply.github.com> --------- Signed-off-by: Will Murphy <willmurphyscode@users.noreply.github.com>
This commit is contained in:
parent
63927ab49f
commit
5987f46353
22
.github/workflows/release.yaml
vendored
22
.github/workflows/release.yaml
vendored
@ -192,14 +192,24 @@ jobs:
|
|||||||
file: go.mod
|
file: go.mod
|
||||||
artifact-name: sbom.spdx.json
|
artifact-name: sbom.spdx.json
|
||||||
|
|
||||||
- uses: 8398a7/action-slack@77eaa4f1c608a7d68b38af4e3f739dcd8cba273e #v3.19.0
|
- name: Notify Slack of new release
|
||||||
|
uses: slackapi/slack-github-action@91efab103c0de0a537f72a35f6b8cda0ee76bf0a #v2.1.1
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
with:
|
with:
|
||||||
status: ${{ job.status }}
|
webhook: ${{ secrets.SLACK_TOOLBOX_WEBHOOK_URL }}
|
||||||
fields: repo,workflow,action,eventName
|
webhook-type: incoming-webhook
|
||||||
text: "A new Syft release has been published: https://github.com/anchore/syft/releases/tag/${{ github.event.inputs.version }}"
|
payload: |
|
||||||
env:
|
text: "A new Syft release has been published: https://github.com/anchore/syft/releases/tag/${{ github.event.inputs.version }}"
|
||||||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_TOOLBOX_WEBHOOK_URL }}
|
blocks:
|
||||||
|
- type: section
|
||||||
|
text:
|
||||||
|
type: mrkdwn
|
||||||
|
text: |
|
||||||
|
*A new Syft release has been published* :rocket:
|
||||||
|
• Release: <https://github.com/anchore/syft/releases/tag/${{ github.event.inputs.version }}|${{ github.event.inputs.version }}>
|
||||||
|
• Repo: `${{ github.repository }}`
|
||||||
|
• Workflow: `${{ github.workflow }}`
|
||||||
|
• Event: `${{ github.event_name }}`
|
||||||
if: ${{ success() }}
|
if: ${{ success() }}
|
||||||
|
|
||||||
release-install-script:
|
release-install-script:
|
||||||
|
|||||||
@ -64,11 +64,21 @@ jobs:
|
|||||||
Update CPE dictionary index based on the latest available CPE dictionary
|
Update CPE dictionary index based on the latest available CPE dictionary
|
||||||
token: ${{ steps.generate-token.outputs.token }}
|
token: ${{ steps.generate-token.outputs.token }}
|
||||||
|
|
||||||
- uses: 8398a7/action-slack@77eaa4f1c608a7d68b38af4e3f739dcd8cba273e #v3.19.0
|
- name: Notify Slack on failure
|
||||||
|
uses: slackapi/slack-github-action@91efab103c0de0a537f72a35f6b8cda0ee76bf0a #v2.1.1
|
||||||
with:
|
with:
|
||||||
status: ${{ job.status }}
|
webhook: ${{ secrets.SLACK_TOOLBOX_WEBHOOK_URL }}
|
||||||
fields: workflow,eventName,job
|
webhook-type: incoming-webhook
|
||||||
text: Syft CPE dictionary index update failed
|
payload: |
|
||||||
env:
|
text: "Syft CPE dictionary index update failed"
|
||||||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_TOOLBOX_WEBHOOK_URL }}
|
blocks:
|
||||||
|
- type: section
|
||||||
|
text:
|
||||||
|
type: mrkdwn
|
||||||
|
text: |
|
||||||
|
*Syft CPE dictionary index update failed*
|
||||||
|
• Workflow: `${{ github.workflow }}`
|
||||||
|
• Event: `${{ github.event_name }}`
|
||||||
|
• Job Status: `${{ job.status }}`
|
||||||
|
• <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|View Run>
|
||||||
if: ${{ failure() && env.SLACK_NOTIFICATIONS == 'true' }}
|
if: ${{ failure() && env.SLACK_NOTIFICATIONS == 'true' }}
|
||||||
|
|||||||
22
.github/workflows/update-spdx-license-list.yaml
vendored
22
.github/workflows/update-spdx-license-list.yaml
vendored
@ -44,11 +44,21 @@ jobs:
|
|||||||
Update SPDX license list based on the latest available list from spdx.org
|
Update SPDX license list based on the latest available list from spdx.org
|
||||||
token: ${{ steps.generate-token.outputs.token }}
|
token: ${{ steps.generate-token.outputs.token }}
|
||||||
|
|
||||||
- uses: 8398a7/action-slack@77eaa4f1c608a7d68b38af4e3f739dcd8cba273e #v3.19.0
|
- name: Notify Slack on failure
|
||||||
|
uses: slackapi/slack-github-action@91efab103c0de0a537f72a35f6b8cda0ee76bf0a #v2.1.1
|
||||||
with:
|
with:
|
||||||
status: ${{ job.status }}
|
webhook: ${{ secrets.SLACK_TOOLBOX_WEBHOOK_URL }}
|
||||||
fields: workflow,eventName,job
|
webhook-type: incoming-webhook
|
||||||
text: Syft SPDX license list update failed
|
payload: |
|
||||||
env:
|
text: "Syft SPDX license list update failed"
|
||||||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_TOOLBOX_WEBHOOK_URL }}
|
blocks:
|
||||||
|
- type: section
|
||||||
|
text:
|
||||||
|
type: mrkdwn
|
||||||
|
text: |
|
||||||
|
*Syft SPDX license list update failed*
|
||||||
|
• Workflow: `${{ github.workflow }}`
|
||||||
|
• Event: `${{ github.event_name }}`
|
||||||
|
• Job Status: `${{ job.status }}`
|
||||||
|
• <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|View Run>
|
||||||
if: ${{ failure() && env.SLACK_NOTIFICATIONS == 'true' }}
|
if: ${{ failure() && env.SLACK_NOTIFICATIONS == 'true' }}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user