From b11b2861ab71f8d9639414dd6e1061573a9c3e6e Mon Sep 17 00:00:00 2001 From: Sergio <77530549+sergi0g@users.noreply.github.com> Date: Wed, 10 Jul 2024 09:31:32 +0300 Subject: [PATCH] Update build action --- .github/workflows/build.yml | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1a6a1e4..ca6e50b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,8 +1,9 @@ -name: Build binaries +name: Build docker image on: - push: - branches: ["main"] + release: + types: + - published env: CARGO_TERM_COLOR: always @@ -14,6 +15,14 @@ jobs: - name: Checkout code uses: actions/checkout@v3 + - name: Get latest release tag + id: release + uses: pozetroninc/github-action-get-latest-release@master + with: + owner: sergi0g + repo: cup + excludes: prerelease, draft + - name: Set up QEMU uses: docker/setup-qemu-action@v3 @@ -33,6 +42,8 @@ jobs: context: . push: true platforms: linux/amd64,linux/arm64 - tags: ghcr.io/sergi0g/cup:latest + tags: | + ghcr.io/sergi0g/cup:latest + ghcr.io/sergi0g/cup:${{ steps.release.outputs.release }} cache-from: type=gha cache-to: type=gha,mode=max \ No newline at end of file