Skip to content

Commit

Permalink
updated workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
realkaranvir committed Dec 8, 2024
1 parent 750eec5 commit 358d2dc
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ jobs:
build_and_push_docker_image:
name: Push Docker Image to Docker Hub
runs-on: ubuntu-latest
strategy:
matrix:
platform: [linux/amd64, linux/arm64]

steps:
- name: Checkout Repository
Expand All @@ -23,6 +26,9 @@ jobs:
username: ${{ secrets.DOCKER_HUB_EMAIL }}
password: ${{ secrets.DOCKER_HUB_PASSWORD }}

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

Expand All @@ -32,9 +38,9 @@ jobs:
path: |
root/.ivy2
root/.sbt
key: sbt-${{ runner.os }}-${{ hashFiles('**/build.sbt', '**/project/*.sbt') }}
key: sbt-${{ runner.os }}-${{ matrix.platform }}-${{ hashFiles('**/build.sbt', '**/project/*.sbt') }}
restore-keys: |
sbt-${{ runner.os }}-
sbt-${{ runner.os }}-${{ matrix.platform }}
- name: Inject sbt cache into Docker
uses: reproducible-containers/[email protected]
Expand All @@ -50,7 +56,7 @@ jobs:
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64
platforms: linux/amd64, linux/arm64
cache-from: type=gha
cache-to: type=gha,mode=max
push: ${{ github.event_name != 'pull_request' }}
Expand Down

0 comments on commit 358d2dc

Please sign in to comment.