From 568be00ce1d6243bad4efd5f82b3914366235363 Mon Sep 17 00:00:00 2001 From: seaweedbrain Date: Sat, 6 Jul 2024 10:38:03 -0400 Subject: [PATCH] Fix undefined used var --- .github/workflows/deploy.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index be3b7a2..0460908 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -5,7 +5,7 @@ on: tags: [ '*.*' ] env: - DOCKER_IMAGE_NAME: "galera-healthcheck" + DOCKER_IMAGE_NAME: "galera_cluster_healthcheck" jobs: build-and-publish-image: name: Build and Publish Docker image @@ -14,7 +14,9 @@ jobs: - uses: actions/checkout@v3 - name: Build working-directory: ./app - run: docker build -t $DOCKER_IMAGE_NAME:latest -t $DOCKER_IMAGE_NAME:$current_version . + run: | + current_version=$(echo ${{ github.ref_name }} | sed 's/\([0-9]*\.[0-9]*\).*$/\1/') + docker build -t $DOCKER_IMAGE_NAME:latest -t $DOCKER_IMAGE_NAME:$current_version . - name: Login to GitHub Container Registry run: echo ${{ secrets.TOKEN }} | docker login ghcr.io -u ${{ secrets.USERNAME }} --password-stdin - name: Push Docker image to GitHub Container Registry