Skip to content

v1.214.4

v1.214.4 #11

name: Slack Post
on:
workflow_dispatch: # Manual trigger
inputs:
github_ref:
description: 'Manually provided value for GITHUB_RELEASE_TAG of a release'
required: true
type: string
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#release
release:
types: [published]
jobs:
build:
name: Slack Post
runs-on: ubuntu-latest
steps:
- name: 'Checkout the needed file only ./bin/announce_release_on_slack.py'
uses: actions/checkout@v3
- run: |
if [[ ${{ github.event_name == 'workflow_dispatch' }} == true ]]; then
export GITHUB_RELEASE_TAG=${{ inputs.github_ref }}
else # release event
export GITHUB_RELEASE_TAG=$(basename ${GITHUB_REF})
fi
echo "New release published ${GITHUB_RELEASE_TAG}"
pip3 install PyGithub
echo $PWD
ls -lah
./bin/announce_release_on_slack.py
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
SLACK_CHANNEL_ID_RELEASES: ${{ secrets.SLACK_CHANNEL_ID_RELEASES }}