Skip to content

Automate browser based workflows with AI

Upgrade docker GH actions + use layers caching for faster builds (#2697)

Asher Foaaffb4e046280
diff --git a/.github/workflows/build-docker-image.yml b/.github/workflows/build-docker-image.yml
index b67d32d13..1d8e9e0d5 100644
--- a/.github/workflows/build-docker-image.yml
+++ b/.github/workflows/build-docker-image.yml
@@ -34,10 +34,10 @@ jobs:
username: ${{ env.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Set up Docker Buildx
- uses: docker/setup-buildx-action@v1
+ uses: docker/setup-buildx-action@v3
- name: Build, tag, and push backend image to Amazon Public ECR and Docker Hub
id: build-image
- uses: docker/build-push-action@v2
+ uses: docker/build-push-action@v6
env:
ECR_REGISTRY: ${{ steps.login-ecr-public.outputs.registry }}
with:
@@ -46,6 +46,8 @@ jobs:
linux/amd64
linux/arm64
push: true
+ cache-from: type=gha
+ cache-to: type=gha,mode=max
tags: |
${{ env.ECR_REGISTRY}}/${{ env.REGISTRY_ALIAS }}/${{ env.ECR_BACKEND_REPOSITORY }}:${{ github.sha }}
${{ env.ECR_REGISTRY}}/${{ env.REGISTRY_ALIAS }}/${{ env.ECR_BACKEND_REPOSITORY }}:${{ github.event.release.tag_name }}
@@ -55,12 +57,14 @@ jobs:
${{ env.DOCKERHUB_USERNAME }}/${{ env.ECR_BACKEND_REPOSITORY }}:latest
- name: Build, tag, and push ui image to Amazon Public ECR and Docker Hub
id: build-ui-image
- uses: docker/build-push-action@v2
+ uses: docker/build-push-action@v6
env:
ECR_REGISTRY: ${{ steps.login-ecr-public.outputs.registry }}
with:
context: .
file: Dockerfile.ui
+ cache-from: type=gha
+ cache-to: type=gha,mode=max
platforms: |
linux/amd64
linux/arm64