From 9916c86af0fc512482100e66fe4de973be1e5dac Mon Sep 17 00:00:00 2001 From: Pol Alvarez Date: Mon, 2 Oct 2023 15:20:36 +0200 Subject: [PATCH] refactor: build-push in the same step in gh actions Signed-off-by: Pol Alvarez --- .github/workflows/ci.yaml | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index a8c303aa7c..eacc70b701 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -264,26 +264,18 @@ jobs: - id: build-docker-image name: Build Docker image - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v5 with: context: . file: ./Dockerfile platforms: linux/amd64 tags: ${{ format('{0}/{1}:{2}', steps.login-ecr.outputs.registry, steps.ref.outputs.repo-name, steps.ref.outputs.image-tag) }} - push: false - load: true + push: true + provenance: false build-args: READONLY_API_TOKEN_GITHUB=${{ secrets.READONLY_API_TOKEN_GITHUB }} cache-from: type=gha cache-to: type=gha,mode=max - - id: push - name: Push docker image to ECR - run: |- - echo Pushing image $IMAGE_NAME to ECR. - docker push $IMAGE_NAME - env: - IMAGE_NAME: ${{ format('{0}/{1}:{2}', steps.login-ecr.outputs.registry, steps.ref.outputs.repo-name, steps.ref.outputs.image-tag) }} - deploy: name: Deploy to Kubernetes runs-on: ubuntu-20.04