diff --git a/.github/workflows/build-image.yml b/.github/workflows/build-image.yml index 86de50a..9d1b966 100644 --- a/.github/workflows/build-image.yml +++ b/.github/workflows/build-image.yml @@ -55,6 +55,18 @@ jobs: - name: Checkout uses: actions/checkout@v2 + - + name: Docker meta + id: meta + uses: docker/metadata-action@v3 + with: + # list of Docker images to use as base name for tags + images: | + ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME + # generate Docker tags based on the following events/attributes + tags: | + type=semver,pattern={{row}} + type=sha - name: Set up QEMU uses: docker/setup-qemu-action@v1 @@ -62,7 +74,7 @@ jobs: name: Set up Docker Buildx uses: docker/setup-buildx-action@v1 - - name: Login to DockerHub + name: Login to ghcr uses: docker/login-action@v1 with: registry: ghcr.io @@ -75,5 +87,5 @@ jobs: context: . platforms: linux/amd64,linux/arm64 push: true - tags: user/app:latest + tags: ${{ steps.meta.outputs.tags }}