diff --git a/.gitea/workflows/main.yml b/.gitea/workflows/main.yml index 254d403..a454be2 100644 --- a/.gitea/workflows/main.yml +++ b/.gitea/workflows/main.yml @@ -59,7 +59,7 @@ jobs: path: build/ docker-push: - name: Push Image to Gitea Registry + name: CD - Push Image to Gitea Registry runs-on: docker-latest needs: [docker-test, go-build] steps: @@ -110,7 +110,7 @@ jobs: run: kubectl get nodes -o wide k8s-deploy: - name: Kubernetes Deployment + name: CD - Kubernetes Deployment runs-on: docker-latest needs: [go-build, k8s-some-test, docker-push] steps: @@ -124,6 +124,13 @@ jobs: env: KUBECONFIG_GITEA: ${{ secrets.KUBECONFIG_GITEA }} + - name: Compute image tag (again for this job) + run: | + TAG="${GITHUB_SHA:-${{ github.sha }}}" + echo "TAG=$TAG" >> $GITHUB_ENV + echo "BASE_IMAGE=git.petyaserver.uk/${{ secrets.REGISTRY_USER }}/go-api" >> $GITHUB_ENV + echo "Will deploy image: ${BASE_IMAGE}:${TAG}" + - name: Verify connection run: kubectl get nodes -o wide