From c1396977890e836e00d2a6b96142f76243f74897 Mon Sep 17 00:00:00 2001 From: Igor Katson Date: Thu, 29 Aug 2024 16:32:22 +0100 Subject: [PATCH] Better docker tags + main building docker --- .github/workflows/release-linux.yml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release-linux.yml b/.github/workflows/release-linux.yml index 2c8e0e9b..06bf9b68 100644 --- a/.github/workflows/release-linux.yml +++ b/.github/workflows/release-linux.yml @@ -2,6 +2,8 @@ name: Release binaries for Linux and Docker on: push: + branches: + - main tags: - "v*.*.*" @@ -69,6 +71,7 @@ jobs: cp -l ${{ matrix.platform }}/rqbit rqbit-${{ steps.gen_artifact_key.outputs.key }} - uses: softprops/action-gh-release@v1 + if: ${{ github.ref_type == 'tag' }} with: generate_release_notes: true files: | @@ -86,6 +89,17 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Docker meta + id: meta + uses: docker/metadata-action@v5 + with: + images: | + ikatson/rqbit + tags: | + type=ref,event=branch + type=semver,pattern={{version}} + type=semver,pattern={{major}}.{{minor}} + - uses: actions/download-artifact@v4 with: name: linux-arm-v7 @@ -114,7 +128,7 @@ jobs: uses: docker/build-push-action@v6 with: push: true - tags: ikatson/rqbit:${{ github.ref_name }} + tags: ${{ steps.meta.outputs.tags }} platforms: linux/amd64,linux/arm64,linux/arm/v7 context: target/cross/ file: docker/Dockerfile