-
-
Notifications
You must be signed in to change notification settings - Fork 4
43 lines (38 loc) · 1.47 KB
/
bump-version.yml
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
43
name: Bump version
on:
workflow_dispatch: # Allow manually running
push:
branches:
- main
paths: # Only if any of these files has changed
- 'Dockerfile'
- 'requirements.txt'
jobs:
build:
# Requires '[bump version]' to be present in the Git commit message or commit body
# This is used so we don't accidentally publish an image on a commit to main.cancel-timeout-minutes:
# Renovate will add '[bump version]' when it changes dependencies within the Dockerfile.
if: contains(github.event.head_commit.message, '[bump version]')
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
# Bump the `patch` level
- name: Bump version and push tag
id: tag_version
uses: mathieudutour/github-tag-action@v6.2
with:
github_token: ${{ secrets.REPO_GITHUB_SECRET }}
fetch_all_tags: false
default_bump: patch
# This new Github Release will kickoff the the pipeline at `docker-image.yml`
# A release tag is needed for the pipeline to run correctly
- name: Create a GitHub release
uses: ncipollo/release-action@v1.14.0
with:
# Get the tag name from previous step
tag: ${{ steps.tag_version.outputs.new_tag }}
name: ${{ steps.tag_version.outputs.new_tag }}
generateReleaseNotes: true
makeLatest: true