Skip to content

Commit

Permalink
Move PR title condition to run command
Browse files Browse the repository at this point in the history
  • Loading branch information
abhay-krishna committed Aug 6, 2024
1 parent c039cb0 commit af019e6
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/baseimage-pr-notifier.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,13 @@ on:
jobs:
baseimage-pr-notifier:
runs-on: ubuntu-latest

if: ${{ contains(github.event.pull_request.title, 'Update base image') }}

steps:
- run: curl -d '{"key":"base image"}' -X POST $SLACK_WEBHOOK
- run: |
if [[ "${{ github.event.pull_request.title }}" =~ "Update base image" ]]; then
curl -d '{"key":"builder-base image"}' -X POST $SLACK_WEBHOOK
fi
exit 0
shell: bash
env:
SLACK_WEBHOOK : ${{ secrets.SLACK_WEBHOOK_URL }}
10 changes: 7 additions & 3 deletions .github/workflows/builder-baseimage-pr-notifier.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,13 @@ on:
jobs:
builder-baseimage-pr-notifier:
runs-on: ubuntu-latest

if: ${{ contains(github.event.pull_request.title, 'Update builder-base') }}

steps:
- run: curl -d '{"key":"builder-base image"}' -X POST $SLACK_WEBHOOK
- run: |
if [[ "${{ github.event.pull_request.title }}" =~ "Update builder-base" ]]; then
curl -d '{"key":"builder-base image"}' -X POST $SLACK_WEBHOOK
fi
exit 0
shell: bash
env:
SLACK_WEBHOOK : ${{ secrets.SLACK_WEBHOOK_URL }}

0 comments on commit af019e6

Please sign in to comment.