ci(docker): build local code checkout, add caching to dev build

This commit is contained in:
Matthew Penner 2022-10-20 14:32:23 -06:00
parent 4dd30fe2f0
commit 5331fd2cdb
No known key found for this signature in database

View file

@ -40,6 +40,8 @@ jobs:
uses: docker/build-push-action@v2 uses: docker/build-push-action@v2
if: "contains(github.ref, 'release/v')" if: "contains(github.ref, 'release/v')"
with: with:
context: .
file: ./Dockerfile
push: true push: true
platforms: linux/amd64,linux/arm64 platforms: linux/amd64,linux/arm64
tags: ${{ steps.docker_meta.outputs.tags }} tags: ${{ steps.docker_meta.outputs.tags }}
@ -49,7 +51,11 @@ jobs:
uses: docker/build-push-action@v2 uses: docker/build-push-action@v2
if: "contains(github.ref, 'develop')" if: "contains(github.ref, 'develop')"
with: with:
context: .
file: ./Dockerfile
push: ${{ github.event_name != 'pull_request' }} push: ${{ github.event_name != 'pull_request' }}
platforms: linux/amd64,linux/arm64 platforms: linux/amd64,linux/arm64
tags: ${{ steps.docker_meta.outputs.tags }} tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }} labels: ${{ steps.docker_meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max