-
Notifications
You must be signed in to change notification settings - Fork 207
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
attempting to create different caches for each platform
- Loading branch information
1 parent
5634559
commit 8a7e751
Showing
1 changed file
with
6 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
@@ -32,9 +35,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] | ||
|
@@ -50,6 +53,7 @@ jobs: | |
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
platforms: ${{ matrix.platform }} | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max | ||
push: ${{ github.event_name != 'pull_request' }} | ||
|