Merge pull request #158 from nanos/auto-tagging
Update version string on tagged releases
This commit is contained in:
commit
8ac868fda4
2 changed files with 35 additions and 5 deletions
13
.github/workflows/build-container.yaml
vendored
13
.github/workflows/build-container.yaml
vendored
|
|
@ -1,15 +1,17 @@
|
||||||
name: Build Container
|
name: Build Container
|
||||||
|
|
||||||
"on":
|
on:
|
||||||
push:
|
workflow_run:
|
||||||
tags:
|
workflows: [Update Version number]
|
||||||
- "v[0-9]+.[0-9]+.[0-9]+"
|
types:
|
||||||
|
- completed
|
||||||
jobs:
|
jobs:
|
||||||
docker:
|
docker:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
- name: Set up QEMU
|
- name: Set up QEMU
|
||||||
|
|
||||||
uses: docker/setup-qemu-action@v3
|
uses: docker/setup-qemu-action@v3
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
@ -24,6 +26,7 @@ jobs:
|
||||||
id: docker_build
|
id: docker_build
|
||||||
uses: docker/build-push-action@v5
|
uses: docker/build-push-action@v5
|
||||||
with:
|
with:
|
||||||
|
context: .
|
||||||
push: true
|
push: true
|
||||||
platforms: linux/amd64,linux/arm64
|
platforms: linux/amd64,linux/arm64
|
||||||
tags: |
|
tags: |
|
||||||
|
|
|
||||||
27
.github/workflows/update-version-number.yaml
vendored
Normal file
27
.github/workflows/update-version-number.yaml
vendored
Normal file
|
|
@ -0,0 +1,27 @@
|
||||||
|
name: Update Version number
|
||||||
|
|
||||||
|
"on":
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- "v[0-9]+.[0-9]+.[0-9]+"
|
||||||
|
jobs:
|
||||||
|
run:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout original repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
- name: Setup Git
|
||||||
|
run: |
|
||||||
|
git config user.name nanos-bot
|
||||||
|
git config user.email bot@thms.uk
|
||||||
|
- name: Update version number
|
||||||
|
run: |
|
||||||
|
VERSION=${{ github.ref_name }}
|
||||||
|
VERSION="${VERSION:1}"
|
||||||
|
sed -i '' -E 's/VERSION = "[0-9]+.[0-9]+.[0-9]+"/VERSION = "'$VERSION'"/' find_posts.py
|
||||||
|
git add find_posts.py
|
||||||
|
git commit -m "[bot] Bump version to $VERSION"
|
||||||
|
- name: Push to repository
|
||||||
|
run: git push --quiet
|
||||||
Loading…
Reference in a new issue