From 8ac1e0fb9fcd37c4f81bba33e6e82337af45a4a1 Mon Sep 17 00:00:00 2001 From: johnnyaug Date: Mon, 30 Oct 2023 11:38:02 +0200 Subject: [PATCH] docker minor major tags --- .github/workflows/docker-publish.yaml | 29 ++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/.github/workflows/docker-publish.yaml b/.github/workflows/docker-publish.yaml index a49c39bfec5..277c0104f6e 100644 --- a/.github/workflows/docker-publish.yaml +++ b/.github/workflows/docker-publish.yaml @@ -76,7 +76,24 @@ jobs: with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} - + - name: lakectl docker metadata + id: lakectl_meta + uses: docker/metadata-action@v5 + with: + images: treeverse/lakectl,${{ steps.login-ecr.outputs.registry }}/lakectl + tags: | + type=semver,pattern={{version}},value=${{ steps.version.outputs.tag }} + type=semver,pattern={{major}}.{{minor}},value=${{ steps.version.outputs.tag }} + type=semver,pattern={{major}},value=${{ steps.version.outputs.tag }} + - name: lakefs docker metadata + id: lakefs_meta + uses: docker/metadata-action@v5 + with: + images: treeverse/lakefs,${{ steps.login-ecr.outputs.registry }}/lakefs + tags: | + type=semver,pattern={{version}},value=${{ steps.version.outputs.tag }} + type=semver,pattern={{major}}.{{minor}},value=${{ steps.version.outputs.tag }} + type=semver,pattern={{major}},value=${{ steps.version.outputs.tag }} - name: Build and push lakectl uses: docker/build-push-action@v3 with: @@ -85,10 +102,7 @@ jobs: push: true platforms: linux/amd64,linux/arm64,darwin/amd64,darwin/arm64 build-args: VERSION=${{ steps.version.outputs.tag }} - tags: | - ${{ steps.login-ecr.outputs.registry }}/lakectl:${{ steps.version.outputs.tag }} - treeverse/lakectl:${{ steps.version.outputs.tag }} - treeverse/lakectl:latest + tags: ${{ steps.lakectl_meta.outputs.tags }} - name: Build and push lakefs uses: docker/build-push-action@v3 @@ -98,7 +112,4 @@ jobs: push: true platforms: linux/amd64,linux/arm64,darwin/amd64,darwin/arm64 build-args: VERSION=${{ steps.version.outputs.tag }} - tags: | - ${{ steps.login-ecr.outputs.registry }}/lakefs:${{ steps.version.outputs.tag }} - treeverse/lakefs:${{ steps.version.outputs.tag }} - treeverse/lakefs:latest + tags: ${{ steps.lakefs_meta.outputs.tags }}