diff --git a/.github/workflows/build_image.yml b/.github/workflows/build_image.yml index 9a87a46..a5818b5 100644 --- a/.github/workflows/build_image.yml +++ b/.github/workflows/build_image.yml @@ -43,9 +43,27 @@ jobs: uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7 with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + - name: Docker meta + id: # you'll use this in the next step + uses: docker/metadata-action@v3 + with: + # list of Docker images to use as base name for tags + images: | + + # Docker tags based on the following events/attributes + tags: | + type=schedule + type=ref,event=branch + type=ref,event=pr + type=semver,pattern={{version}} + type=semver,pattern={{major}}.{{minor}} + type=semver,pattern={{major}} + type=sha - name: Build and push uses: docker/build-push-action@v2 with: context: . platforms: linux/amd64,linux/arm/v7 push: ${{ github.event_name != 'pull_request' }} + tags: ${{ steps..outputs.tags }} + labels: ${{ steps..outputs.labels }}