Skip to content
Merged
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
8 changes: 7 additions & 1 deletion .github/workflows/base-image-pr-notifier.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,16 @@ jobs:
env:
PR_TITLE: ${{ github.event.pull_request.title }}
PR_AUTHOR: ${{ github.event.pull_request.user.login }}
PR_URL: ${{ github.event.pull_request.html_url }}
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
run: |
if [[ "$PR_AUTHOR" == "eks-distro-pr-bot" && ( "$PR_TITLE" == *"Update base image"* || "$PR_TITLE" == *"Update builder-base image"* || "$PR_TITLE" == *"Update golang"* || "$PR_TITLE" == *"Update GIT_TAG and GOLANG_VERSION"* ) ]]; then
curl -X POST $SLACK_WEBHOOK
payload=$(jq -n \
--arg repo "$GITHUB_REPOSITORY" \
--arg pr_title "$PR_TITLE" \
--arg pr_url "$PR_URL" \
'{repo: $repo, pr_title: $pr_title, pr_url: $pr_url}')
curl -X POST -H 'Content-Type: application/json' --data "$payload" "$SLACK_WEBHOOK"
echo "Base image update detected - Slack notification sent"
else
echo "Not a base image update PR - Skipping notification"
Expand Down
Loading