Skip to content

Commit 4bf4dc7

Browse files
committed
docs: add slack notification
1 parent ce32f37 commit 4bf4dc7

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

.github/workflows/clean-up-unused-images.yaml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -94,14 +94,21 @@ jobs:
9494
Please review this PR carefully before merging it.'
9595
9696
output=$(gh pr create --base master --title "docs: clean up librarium unused images " --body "$pr_body" --label "$backport_labels")
97-
echo $output
9897
pr_url=$(echo "$output" | grep -o "https://[^ ]*")
99-
echo $pr_url
100-
101-
echo "CREATED_CLEANUP_PR=pr_url" >> $GITHUB_ENV
102-
103-
echo "PR successfully created $CREATED_CLEANUP_PR."
98+
echo "PR successfully created $pr_url."
10499
100+
echo "GITHUB_CREATED_CLEANUP_PR=$pr_url" >> $GITHUB_ENV
105101
env:
106102
GH_TOKEN: ${{ steps.import-secrets.outputs.VAULT_GITHUB_TOKEN }}
107103

104+
- name: Slack Notification
105+
if: $GITHUB_CREATED_CLEANUP_PR != ""
106+
uses: rtCamp/[email protected]
107+
env:
108+
SLACK_WEBHOOK: ${{ secrets.SLACK_PRIVATE_TEAM_WEBHOOK }}
109+
SLACK_USERNAME: "spectromate"
110+
SLACK_ICON_EMOJI: ":ok_hand:"
111+
SLACK_COLOR: ${{ job.status }}
112+
SLACKIFY_MARKDOWN: true
113+
ENABLE_ESCAPES: true
114+
SLACK_MESSAGE: 'A new PR with unused images to clean up was created. Please review $env.GITHUB_CREATED_CLEANUP_PR for more details.'

0 commit comments

Comments
 (0)