From 32f912d130b80293e91bdc4d5ffd7e462454a699 Mon Sep 17 00:00:00 2001 From: bap2pecs Date: Tue, 5 Nov 2024 09:04:48 +0700 Subject: [PATCH] fix CI: tag for push not set --- .github/workflows/publish.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index bea2909bbd13..4749bb6949ee 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -26,13 +26,13 @@ jobs: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Get the version - id: get_version + - name: Set the Docker image tag + id: set_docker_image_tag run: | - if [[ $GITHUB_REF == refs/pull/* ]]; then - echo "VERSION=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT - elif [[ $GITHUB_REF == refs/tags/* ]]; then - echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT + if [[ $GITHUB_REF == refs/tags/* ]]; then + echo "TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT + else + echo "TAG=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT fi - name: Build and push to Docker Hub @@ -42,5 +42,5 @@ jobs: push: true file: ./ops/docker/op-stack-go/Dockerfile target: op-node-target - outputs: type=image,name=${{ vars.DOCKERHUB_REGISTRY_ID }}/op-node-babylon-finality-gadget:${{ steps.get_version.outputs.VERSION }} + outputs: type=image,name=${{ vars.DOCKERHUB_REGISTRY_ID }}/op-node-babylon-finality-gadget:${{ steps.set_docker_image_tag.outputs.TAG }}