Merge pull request #46 from draios/add-prefix-flag-to-version-take-3 #38
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: "Tag and build" | |
on: | |
push: | |
branches: ["main"] | |
jobs: | |
pre-commit: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/[email protected] | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- uses: pre-commit/[email protected] | |
tagging: | |
name: "Tagging" | |
needs: pre-commit | |
runs-on: ubuntu-latest | |
outputs: | |
next_tag: ${{ steps.tag_version.outputs.new_version }} | |
steps: | |
- uses: actions/[email protected] | |
- name: Bump version and push tag | |
id: tag_version | |
uses: mathieudutour/[email protected] | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
- run: | | |
echo Calculated Next Tag is ${{ steps.tag_version.outputs.new_tag }} | |
post_slack: | |
runs-on: ubuntu-latest | |
needs: tagging | |
steps: | |
- name: Post to a Slack channel | |
if: ${{ success() }} | |
id: slack_success | |
uses: slackapi/[email protected] | |
with: | |
channel-id: 'sdcadmin-operator' | |
slack-message: ':cool-doge: `${{github.repository}}` new version: ${{needs.tagging.outputs.next_tag}}' | |
env: | |
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} |