ci: add semver releases (#71)
Adding semver release based on conventional commit, as well as adding prerelease support via workflow_dispatch. Reviewed-on: #71 Reviewed-by: branch-buddy <branch-buddy@t00n.de> Co-authored-by: Timo Behrendt <t.behrendt@t00n.de> Co-committed-by: Timo Behrendt <t.behrendt@t00n.de>
This commit was merged in pull request #71.
This commit is contained in:
@@ -11,6 +11,7 @@ on:
|
|||||||
- tsconfig.json
|
- tsconfig.json
|
||||||
- Dockerfile
|
- Dockerfile
|
||||||
- bun.lockb
|
- bun.lockb
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
env:
|
env:
|
||||||
DOCKER_REGISTRY: gitea.t000-n.de
|
DOCKER_REGISTRY: gitea.t000-n.de
|
||||||
@@ -77,10 +78,34 @@ jobs:
|
|||||||
tags: |
|
tags: |
|
||||||
${{ env.DOCKER_REGISTRY }}/t00n/${{ steps.meta.outputs.REPO_NAME }}:${{ steps.meta.outputs.REPO_VERSION }}-${{ matrix.arch }}
|
${{ env.DOCKER_REGISTRY }}/t00n/${{ steps.meta.outputs.REPO_NAME }}:${{ steps.meta.outputs.REPO_VERSION }}-${{ matrix.arch }}
|
||||||
|
|
||||||
|
create_tag:
|
||||||
|
name: Create tag
|
||||||
|
needs:
|
||||||
|
- test
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
outputs:
|
||||||
|
tag: ${{ steps.tag.outputs.new-tag }}
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
- uses: https://gitea.t000-n.de/t.behrendt/conventional-semantic-git-tag-increment@0.1.20
|
||||||
|
id: tag
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.GITEA_TOKEN }}
|
||||||
|
prerelease: ${{ github.event_name == 'workflow_dispatch' }}
|
||||||
|
- uses: https://gitea.t000-n.de/t.behrendt/actions/release-git-tag@0.0.2
|
||||||
|
with:
|
||||||
|
tag: ${{ steps.tag.outputs.new-tag }}
|
||||||
|
- name: Set output
|
||||||
|
run: |
|
||||||
|
echo "tag=${{ steps.tag.outputs.new-tag }}" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
create_manifest:
|
create_manifest:
|
||||||
name: Create manifest
|
name: Create manifest
|
||||||
needs:
|
needs:
|
||||||
- build_and_push
|
- build_and_push
|
||||||
|
- create_tag
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
@@ -101,8 +126,8 @@ jobs:
|
|||||||
|
|
||||||
- name: Create manifest
|
- name: Create manifest
|
||||||
run: |
|
run: |
|
||||||
docker manifest create ${{ env.DOCKER_REGISTRY }}/t00n/${{ steps.meta.outputs.REPO_NAME }}:latest \
|
docker manifest create ${{ env.DOCKER_REGISTRY }}/t.behrendt/${{ steps.meta.outputs.REPO_NAME }}:${{ needs.create_tag.outputs.tag }} \
|
||||||
${{ env.DOCKER_REGISTRY }}/t00n/${{ steps.meta.outputs.REPO_NAME }}:${{ steps.meta.outputs.REPO_VERSION }}-amd64 \
|
${{ env.DOCKER_REGISTRY }}/t.behrendt/${{ steps.meta.outputs.REPO_NAME }}:${{ steps.meta.outputs.REPO_VERSION }}-amd64 \
|
||||||
${{ env.DOCKER_REGISTRY }}/t00n/${{ steps.meta.outputs.REPO_NAME }}:${{ steps.meta.outputs.REPO_VERSION }}-arm64
|
${{ env.DOCKER_REGISTRY }}/t.behrendt/${{ steps.meta.outputs.REPO_NAME }}:${{ steps.meta.outputs.REPO_VERSION }}-arm64
|
||||||
|
|
||||||
docker manifest push ${{ env.DOCKER_REGISTRY }}/t00n/${{ steps.meta.outputs.REPO_NAME }}:latest
|
docker manifest push ${{ env.DOCKER_REGISTRY }}/t.behrendt/${{ steps.meta.outputs.REPO_NAME }}:${{ needs.create_tag.outputs.tag }}
|
||||||
|
|||||||
Reference in New Issue
Block a user