diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index e1f448b..d14e17e 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -1,9 +1,9 @@ --- -name: Build and publish the wyoming-satellite docker image +name: Build and publish the docker image on: push: - # We only want to build on repackaging tags + # Tags follow the format `v${UPSTREAM_VERSION}-${IMAGE_BUILD_REVISION}` # Example: v1.2.0-0 tags: ["v[0-9]+.[0-9]+.[0-9]+-[0-9]+"] @@ -23,7 +23,6 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v4 - # Uses the `docker/login-action` action to log in to the Container registry registry using the account and password that will publish the packages. Once published, the packages are scoped to the account defined here. - name: Log in to the Container registry uses: docker/login-action@e92390c5fb421da1463c202d546fed0ec5c39f20 # v3.1.0 with: @@ -35,6 +34,8 @@ jobs: uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81 # v5.5.1 with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + tags: | + type=semver,pattern={{version}} - name: Build and push Docker image id: push uses: docker/build-push-action@2cdde995de11925a030ce8070c3d77a52ffcf1c0 # v5.3.0 @@ -46,7 +47,7 @@ jobs: - name: Generate artifact attestation uses: actions/attest-build-provenance@v1 with: - subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME}} + subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} subject-digest: ${{ steps.push.outputs.digest }} push-to-registry: true ...