diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ab4b393..346ffc1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,6 +4,7 @@ on: push: branches: - master + - 'v[0-9]+.[0-9]+.[0-9]+' workflow_dispatch: jobs: @@ -30,9 +31,14 @@ jobs: with: registry: ghcr.io username: ${{ github.repository_owner }} - password: ${{ secrets.CR_PAT }} - - - name: Build and push + password: ${{ secrets.GITHUB_TOKEN }} + - name: Bump version and push tag + id: tag_version + uses: mathieudutour/github-tag-action@v6.1 + with: + release_branches: ".*" + github_token: ${{ secrets.GITHUB_TOKEN }} + - name: Build and push uses: docker/build-push-action@v2 with: context: . @@ -42,3 +48,7 @@ jobs: tags: | smartenergyplatform/analytics-flow-repo:latest ghcr.io/senergy-platform/analytics-flow-repo:latest + smartenergyplatform/analytics-flow-repo:prod + ghcr.io/senergy-platform/analytics-flow-repo:prod + smartenergyplatform/analytics-flow-repo:${{ steps.tag_version.outputs.new_tag }} + ghcr.io/senergy-platform/analytics-flow-repo:${{ steps.tag_version.outputs.new_tag }}