From a74260b2ded692f18a1d66ee957fe21fc744d404 Mon Sep 17 00:00:00 2001 From: Michael Johnson Date: Thu, 18 Apr 2024 10:47:16 -0700 Subject: [PATCH] Update docker-publish.yml --- .github/workflows/docker-publish.yml | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 158e49b..bc18904 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -2,7 +2,7 @@ name: Build and Push on: push: - branches: [ main ] + branches: [main, test] env: REGISTRY: ghcr.io @@ -22,9 +22,22 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} + - name: Generate release tag + id: generate_release_tag + uses: amitsingh-007/next-release-tag@v4.0.0 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + tag_prefix: "v" + tag_template: "yyyy.mm.dd.i" + - name: Build and push Docker image uses: docker/build-push-action@v3 with: context: . push: true - tags: ghcr.io/${{ github.repository }}:latest + tags: ghcr.io/${{ github.repository }}:${{ steps.generate_release_tag.outputs.next_release_tag }} + + - name: Create release + uses: ncipollo/release-action@v1 + with: + tag: ${{ steps.generate_release_tag.outputs.next_release_tag }}