diff --git a/.github/workflows/build-and-push-docker.yml b/.github/workflows/build-and-push-docker.yml index f16364b..6df16af 100644 --- a/.github/workflows/build-and-push-docker.yml +++ b/.github/workflows/build-and-push-docker.yml @@ -1,10 +1,11 @@ name: Build and push Docker image to DockerHub on: - release: - types: [published] + push: + tags: + - 'v*' jobs: - push_to_registries: + push-to-registries: name: Push Docker image to Docker Hub and GitHub Packages runs-on: ubuntu-latest steps: @@ -37,6 +38,11 @@ jobs: images: | ${{ github.repository }} ghcr.io/${{ github.repository }} + tags: | + type=ref,event=branch + type=ref,event=pr + type=semver,pattern={{version}} + type=semver,pattern={{major}}.{{minor}} - name: Build and push Docker images uses: docker/build-push-action@v5