From 4ef62e24fa75da71d916d0db50c23d7b967fad23 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Fri, 16 Oct 2026 20:46:51 +0500 Subject: workflows/ci: proper tags for Docker Hub images --- .github/workflows/ci.yml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f8d3f16..5c7281c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -93,6 +93,19 @@ jobs: uses: actions/checkout@v7 with: submodules: recursive + # https://github.com/docker/metadata-action#semver + - id: meta + name: Docker Hub metadata + uses: docker/metadata-action@v6 + with: + images: '${{ secrets.DOCKERHUB_USERNAME }}/math-${{ matrix.project }}' + flavor: | + latest=auto + tags: | + type=ref,event=branch + type=semver,pattern={{version}} + type=semver,pattern={{major}}.{{minor}} + type=semver,pattern={{major}} - name: Set up QEMU uses: docker/setup-qemu-action@v4 - name: Set up Docker Buildx @@ -122,6 +135,7 @@ jobs: # https://stackoverflow.com/a/74552407/514684 context: . file: '${{ matrix.project }}/Dockerfile' + labels: '${{ steps.meta.outputs.labels }}' platforms: '${{ steps.params.outputs.platforms }}' push: '${{ steps.params.outputs.push }}' - tags: '${{ secrets.DOCKERHUB_USERNAME }}/math-${{ matrix.project }}:latest' + tags: '${{ steps.meta.outputs.tags }}' -- cgit v1.3