diff --git a/.gitea/workflows/cd.yaml b/.gitea/workflows/cd.yaml index d466d50..89ef53a 100644 --- a/.gitea/workflows/cd.yaml +++ b/.gitea/workflows/cd.yaml @@ -77,10 +77,34 @@ jobs: tags: | ${{ 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: false + - 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: name: Create manifest needs: - build_and_push + - create_tag runs-on: ubuntu-latest steps: - name: Checkout @@ -101,8 +125,8 @@ jobs: - name: Create manifest run: | - docker manifest create ${{ env.DOCKER_REGISTRY }}/t00n/${{ steps.meta.outputs.REPO_NAME }}:latest \ - ${{ env.DOCKER_REGISTRY }}/t00n/${{ 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 + docker manifest create ${{ env.DOCKER_REGISTRY }}/t.behrendt/${{ steps.meta.outputs.REPO_NAME }}:${{ needs.create_tag.outputs.tag }} \ + ${{ env.DOCKER_REGISTRY }}/t.behrendt/${{ 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 }}-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 }}