HEAT-447 - slack notification when Renovate identifies new runner version #1
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: New PR created - Slack message if it's a renovate Dockerfile PR | |
on: | |
pull_request: | |
types: [opened, reopened] | |
jobs: | |
renovate_pr: | |
runs-on: [ ubuntu-latest ] | |
permissions: | |
contents: write | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v2 | |
- name: Get PR details | |
id: get_pr_details | |
run: | | |
echo "::set-output name=title::$(jq -r .pull_request.title < $GITHUB_EVENT_PATH)" | |
echo "::set-output name=number::$(jq -r .pull_request.number < $GITHUB_EVENT_PATH)" | |
- name: Run action if PR title contains 'actions/runner' | |
if: contains(steps.get_pr_details.outputs.title, 'actions/runner') | |
uses: ./.github/actions/runner-slack-notification | |
with: | |
slack_channel: ${{ vars.NOTIFICATIONS_SLACK_CHANNEL }} | |
slack_bot_token: ${{ secrets.HMPPS_SRE_SLACK_BOT_TOKEN }} | |
pull_request_number: ${{ steps.get_pr_details.outputs.number }} |