diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 03a3bd6e..1bdb57e1 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -3,6 +3,7 @@ name: build on: push: branches: [ master, dev ] + tags: [ 'v*', '[0-9]*' ] pull_request: branches: [ master ] env: @@ -32,11 +33,11 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@bb05f3f5519dd87d3ba754cc423b652a5edd6d2c # v4.2.0 - if: startsWith(${{github.ref}}, 'refs/tags/') + if: startsWith(github.ref, 'refs/tags/') - name: Log in to the Container registry uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f # v4.6.0 - if: startsWith(${{github.ref}}, 'refs/tags/') + if: startsWith(github.ref, 'refs/tags/') with: registry: ${{ env.REGISTRY }} username: ${{ github.actor }} @@ -44,7 +45,7 @@ jobs: - name: Extract metadata (tags, labels) for Docker id: meta - if: startsWith(${{github.ref}}, 'refs/tags/') + if: startsWith(github.ref, 'refs/tags/') uses: docker/metadata-action@dc802804100637a589fabce1cb79ff13a1411302 # v6.2.0 with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} @@ -57,7 +58,7 @@ jobs: - name: Build and push Docker image uses: docker/build-push-action@53b7df96c91f9c12dcc8a07bcb9ccacbed38856a # v7.3.0 - if: startsWith(${{github.ref}}, 'refs/tags/') + if: startsWith(github.ref, 'refs/tags/') with: context: . file: scripts/Dockerfile