Skip to content

new-version

new-version #43

Workflow file for this run

name: new-version
on:
schedule:
- cron: '0 8 1 * *'
workflow_dispatch:
jobs:
new-tag:
runs-on: ubuntu-latest
steps:
- name: Find last tag
uses: oprypin/find-latest-tag@v1
with:
repository: ${{ github.repository }}
releases-only: false
id: previousTag
- name: Checkout previous tag
uses: actions/checkout@v4
with:
ref: ${{ steps.previousTag.outputs.tag }}
token: ${{ secrets.GH_PAT }}
- name: Get sha from commit
id: tagCommitSHA
run: echo "sha=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
- name: Get next patch version
id: nextTag
env:
TAG: ${{ steps.previousTag.outputs.tag }}
run: |
wget -O ./semver https://raw.githubusercontent.com/fsaintjacques/semver-tool/master/src/semver
chmod +x ./semver
echo "nextPatch=$(./semver bump patch $TAG)" >> $GITHUB_OUTPUT
- name: Create new tag
uses: rickstaa/action-create-tag@v1
with:
tag: v${{ steps.nextTag.outputs.nextPatch }}
commit_sha: ${{ steps.tagCommitSHA.outputs.sha }}
message: ""
- name: Create Release
uses: ncipollo/release-action@v1
with:
token: ${{ secrets.GH_PAT }}
tag: v${{ steps.nextTag.outputs.nextPatch }}
name: Release v${{ steps.nexttag.outputs.nextPatch }}
body: |
This is an automatic release to update the packages inside the container
The container image can be downloaded at ghrc.io and docker.io
Basic container:
`ghcr.io/dergeberl/multitool:v${{ steps.nextTag.outputs.nextPatch }}`
`dergeberl/multitool:v${{ steps.nextTag.outputs.nextPatch }}`
Network container:
`ghcr.io/dergeberl/multitool-net:v${{ steps.nextTag.outputs.nextPatch }}`
`dergeberl/multitool-net:v${{ steps.nextTag.outputs.nextPatch }}`
Kubectl container
`ghcr.io/dergeberl/multitool-kubectl:v${{ steps.nextTag.outputs.nextPatch }}`
`dergeberl/multitool-kubectl:v${{ steps.nextTag.outputs.nextPatch }}`
draft: false
prerelease: false