-
Notifications
You must be signed in to change notification settings - Fork 4
42 lines (41 loc) · 1.18 KB
/
tag_and_build.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: "Tag and build"
on:
push:
branches: ["main"]
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: pre-commit/action@v2.0.3
with:
token: ${{ secrets.GITHUB_TOKEN }}
tagging:
name: "Tagging"
needs: pre-commit
runs-on: ubuntu-latest
outputs:
next_tag: ${{ steps.tag_version.outputs.new_version }}
steps:
- uses: actions/checkout@v2
- name: Bump version and push tag
id: tag_version
uses: mathieudutour/github-tag-action@v5.6
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/slack-github-action@v1.15.0
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 }}