Skip to content

Commit c5c4c72

Browse files
committed
fixup! fixup! wip: add reusable workflows
1 parent 94afd14 commit c5c4c72

1 file changed

Lines changed: 9 additions & 7 deletions

File tree

.github/workflows/reusable-review_apps_on_pr_change.yml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,16 @@ jobs:
4545
- name: Log in to Amazon ECR
4646
uses: aws-actions/amazon-ecr-login@5a88a04c91d5c6f97aae0d9be790e64d9b1d47b7 # v1.7.1
4747

48-
- name: Build container
49-
run: |
50-
docker pull "${{ steps.generate_image_uri.outputs.BASE_URI }}" || true # Pull the previous image to warm the cache, but don't fail if it doesn't exist
51-
docker build --tag "${{steps.generate_image_uri.outputs.URI}}" --tag "${{steps.generate_image_uri.outputs.BASE_URI}}" .
48+
- name: Set up Docker Buildx
49+
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.0
5250

53-
- name: Push container
54-
run: |
55-
docker push "${{steps.generate_image_uri.outputs.ECR_REPO }}" --all-tags
51+
- name: Build
52+
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0
53+
with:
54+
push: true
55+
tags: ${{ steps.generate_image_uri.outputs.URI }}
56+
cache-from: type=gha
57+
cache-to: type=gha,mode=max
5658

5759
- name: Deploy review app via CodeBuild
5860
id: codebuild

0 commit comments

Comments
 (0)