Skip to content

Commit

Permalink
Merge pull request hms-dbmi-cellenics#902 from hms-dbmi-cellenics/bui…
Browse files Browse the repository at this point in the history
…ld-push-gh-action

refactor: build-push in the same step in gh actions
  • Loading branch information
kafkasl authored Oct 2, 2023
2 parents 61070be + 9916c86 commit e36cc58
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e36cc58

Please sign in to comment.