From 13a48cc1ff723c396a93e1116ec3d6b5fce14873 Mon Sep 17 00:00:00 2001 From: Alexander Tesfamichael Date: Fri, 1 Sep 2023 12:21:37 +0200 Subject: [PATCH] chore(build): turn on caching --- .github/workflows/build.yaml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 0cc63bd..2ab770f 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -3,7 +3,7 @@ name: Build and Push Docker Image on: push: branches: - - "main" + - main jobs: docker: @@ -11,17 +11,22 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 + - name: Set up QEMU uses: docker/setup-qemu-action@v2 + - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2 + - name: Login to Docker Hub uses: docker/login-action@v2 with: username: blombern password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Extract short SHA run: echo "SHORT_SHA=$(echo ${{ github.sha }} | cut -c 1-7)" >> $GITHUB_ENV + - name: Build and push uses: docker/build-push-action@v4 with: @@ -30,3 +35,5 @@ jobs: tags: | ultrasoundorg/mev-analysis:${{ env.SHORT_SHA }} ultrasoundorg/mev-analysis:latest + cache-from: type=gha + cache-to: type=gha,mode=max