Skip to content

Commit

Permalink
docs: add slack notification
Browse files Browse the repository at this point in the history
  • Loading branch information
addetz committed Oct 23, 2024
1 parent ce32f37 commit 4bf4dc7
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions .github/workflows/clean-up-unused-images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,14 +94,21 @@ jobs:
Please review this PR carefully before merging it.'
output=$(gh pr create --base master --title "docs: clean up librarium unused images " --body "$pr_body" --label "$backport_labels")
echo $output
pr_url=$(echo "$output" | grep -o "https://[^ ]*")
echo $pr_url
echo "CREATED_CLEANUP_PR=pr_url" >> $GITHUB_ENV
echo "PR successfully created $CREATED_CLEANUP_PR."
echo "PR successfully created $pr_url."
echo "GITHUB_CREATED_CLEANUP_PR=$pr_url" >> $GITHUB_ENV
env:
GH_TOKEN: ${{ steps.import-secrets.outputs.VAULT_GITHUB_TOKEN }}

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

0 comments on commit 4bf4dc7

Please sign in to comment.