From 619bb5b4169e64211d006204ada253d8cdc5e987 Mon Sep 17 00:00:00 2001 From: nixargh Date: Thu, 5 Sep 2024 08:37:20 +0300 Subject: [PATCH] CI: enable tagged-release-images job --- .github/workflows/ci.yaml | 38 +++++++++++++++++++------------------- docker/prod/Dockerfile | 1 - 2 files changed, 19 insertions(+), 20 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 308bc030..fab7182b 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -92,10 +92,9 @@ jobs: rolling-release-images: env: - TAG_IMAGE_LATEST: "true" PROD_IMAGE_NAME: ghcr.io/${GITHUB_REPOSITORY} VERSION: dev - #needs: [check, unit-test, integration-test-cli, integration-test-k8s, helm-chart-test] + # needs: [check, unit-test, integration-test-cli, integration-test-k8s, helm-chart-test] needs: [check, unit-test, integration-test-cli, helm-chart-test] name: Release images runs-on: ubuntu-latest @@ -106,6 +105,24 @@ jobs: - name: Build and publish docker images run: make build-publish-image-all + tagged-release-images: + # Only on tags. + if: startsWith(github.ref, 'refs/tags/') + env: + TAG_IMAGE_LATEST: "true" + PROD_IMAGE_NAME: ghcr.io/${GITHUB_REPOSITORY} + # needs: [check, unit-test, integration-test-cli, integration-test-k8s, helm-chart-test] + needs: [check, unit-test, integration-test-cli, helm-chart-test] + name: Tagged release images + runs-on: ubuntu-latest + steps: + - run: echo "VERSION=${GITHUB_REF#refs/*/}" >> ${GITHUB_ENV} # Sets VERSION env var. + - uses: actions/checkout@v4 + - name: Docker login + run: docker login ghcr.io -u ${{ github.actor }} -p "${{ secrets.GITHUB_TOKEN }}" + - name: Build and publish docker images + run: make build-publish-image-all + # integration-test-k8s: # name: Integration test Kubernetes # runs-on: ubuntu-latest @@ -144,20 +161,3 @@ jobs: # echo "Executing integration tests..." # export SLOTH_INTEGRATION_KUBE_CONFIG=/tmp/test.kubeconfig # make ci-integration-k8s - - -# tagged-release-images: -# # Only on tags. -# if: startsWith(github.ref, 'refs/tags/') -# env: -# PROD_IMAGE_NAME: ghcr.io/${GITHUB_REPOSITORY} -# needs: [check, unit-test, integration-test-cli, integration-test-k8s, helm-chart-test] -# name: Tagged release images -# runs-on: ubuntu-latest -# steps: -# - run: echo "VERSION=${GITHUB_REF#refs/*/}" >> ${GITHUB_ENV} # Sets VERSION env var. -# - uses: actions/checkout@v4 -# - name: Docker login -# run: docker login ghcr.io -u ${{ github.actor }} -p "${{ secrets.GITHUB_TOKEN }}" -# - name: Build and publish docker images -# run: make build-publish-image-all diff --git a/docker/prod/Dockerfile b/docker/prod/Dockerfile index 34b851b6..9938a167 100644 --- a/docker/prod/Dockerfile +++ b/docker/prod/Dockerfile @@ -18,7 +18,6 @@ ENV GOARCH=${ARCH} # Compile. WORKDIR /src COPY . . -RUN tree RUN ./scripts/build/bin/build-raw.sh # Although we are on an specific architecture (normally linux/amd64) our go binary has been built for