Skip to content

Commit

Permalink
try caching
Browse files Browse the repository at this point in the history
  • Loading branch information
nilsnolde committed Jan 6, 2024
1 parent b6d87ee commit d3542be
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 8 deletions.
14 changes: 10 additions & 4 deletions .github/workflows/publish_latest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches:
- 'master'
- 'nn-ghcr'
paths-ignore:
- '.gitignore'
- '**.md'
Expand All @@ -28,7 +29,12 @@ jobs:

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

- name: Build and push images
run: |
docker buildx build --push --platform linux/amd64,linux/arm64 --tag ghcr.io/${{ github.repository }}/valhalla:latest .

- uses: docker/build-push-action@v5
with:
context: .
push: false
platforms: linux/amd64,linux/arm64
tags: ghcr.io/${{ github.repository }}/valhalla:latest
cache-from: type=gha
cache-to: type=gha,mode=max
13 changes: 9 additions & 4 deletions .github/workflows/publish_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,12 @@ jobs:

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

- name: Build container image
run: |
docker buildx build --push --platform linux/amd64,linux/arm64 --tag ghcr.io/${{ github.repository }}/valhalla:${{ steps.extract_branch.outputs.branch }} .

- uses: docker/build-push-action@v5
with:
context: .
push: true
platforms: linux/amd64,linux/arm64
tags: ghcr.io/${{ github.repository }}/valhalla:${{ steps.extract_branch.outputs.branch }}
cache-from: type=gha
cache-to: type=gha,mode=max

0 comments on commit d3542be

Please sign in to comment.