From 186f44c65a74c0bf8bb4589fdbf4d35db9231a64 Mon Sep 17 00:00:00 2001 From: Sergio <77530549+sergi0g@users.noreply.github.com> Date: Fri, 25 Oct 2024 16:34:36 +0300 Subject: [PATCH] Update nightly.yml --- .github/workflows/nightly.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 027a348..935a477 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -63,13 +63,23 @@ jobs: username: ${{ github.repository_owner }} password: ${{ secrets.GITHUB_TOKEN }} + - name: Get Docker image tag + id: tag + run: | + if [ "${GITHUB_REF_NAME}" == "main" ]; then + TAG="nightly" + else + TAG="${GITHUB_REF_NAME}-nightly" + fi + echo "tag=$TAG" >> $GITHUB_ENV + - name: Build and push image uses: docker/build-push-action@v6 with: context: . platforms: linux/amd64, linux/arm64 push: true - tags: ghcr.io/sergi0g/cup:nightly + tags: ghcr.io/sergi0g/cup:${{ steps.tag.outputs.tag }} cache-from: type=gha cache-to: type=gha,mode=max