From 6692489089129daf4c28d4e771393d81a6b69edd Mon Sep 17 00:00:00 2001 From: Vladislav Yarmak Date: Sat, 7 Oct 2023 20:02:35 +0300 Subject: [PATCH] docker CI: proper metadata --- .github/workflows/docker-ci.yml | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/.github/workflows/docker-ci.yml b/.github/workflows/docker-ci.yml index 92ff889..021749b 100644 --- a/.github/workflows/docker-ci.yml +++ b/.github/workflows/docker-ci.yml @@ -3,7 +3,7 @@ name: docker-ci on: push: tags: - - 'v*' + - 'v*.*.*' jobs: docker: @@ -24,10 +24,19 @@ jobs: commit-ish: 'HEAD' skip-unshallow: 'true' abbrev: 7 - - - name: Compute Docker tag - id: docker_tag - run: echo "tag=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT + - name: Docker meta + id: meta + uses: docker/metadata-action@v5 + with: + # list of Docker images to use as base name for tags + images: | + ${{ secrets.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }} + # generate Docker tags based on the following events/attributes + tags: | + type=semver,pattern={{version}} + type=semver,pattern={{major}}.{{minor}} + type=semver,pattern={{major}} + type=sha - name: Set up QEMU uses: docker/setup-qemu-action@v3