From 8b86b3c6f4403fa40403620990415470f29a5272 Mon Sep 17 00:00:00 2001 From: Claudio Costa Date: Fri, 28 Jul 2023 11:11:53 -0600 Subject: [PATCH] Use correct image name, regardless of branch (#35) --- .github/workflows/ci.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0acee95..b467c60 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -45,11 +45,15 @@ jobs: id: minikube uses: medyagh/setup-minikube@latest - name: Build image - run: eval $(minikube -p minikube docker-env) && make docker-build + run: | + eval $(minikube -p minikube docker-env) && \ + make docker-build && \ + echo "docker_image=$(docker images --format '{{.Repository}}:{{.Tag}}' | head -n 1)" >> "$GITHUB_ENV" working-directory: ${{ github.workspace }}/${{ github.repository }} - name: Create pod run: | - kubectl run calls-offloader --image=calls-offloader:dev-$(git rev-parse --short HEAD) \ + echo "Running ${{ env.docker_image }}" && \ + kubectl run calls-offloader --image="${{ env.docker_image }}" \ --env="LOGGER_CONSOLELEVEL=debug" --env="LOGGER_ENABLEFILE=false" --env="JOBS_APITYPE=kubernetes" working-directory: ${{ github.workspace }}/${{ github.repository }} - name: Show logs