Fix multistage caching

This commit is contained in:
Jordan Webb 2021-02-02 20:54:30 -06:00
parent ffc6b386f4
commit 465871bdd3
No known key found for this signature in database
GPG Key ID: C341950C47B6CE14

View File

@ -17,6 +17,7 @@ name: Publish container
env:
CONTAINER_NAME: jordemort/pleroma:${{ github.event.inputs.container_tag || 'latest' }}
CACHE_NAME: jordemort/pleroma:cache-unzip
DOCKER_CLI_EXPERIMENTAL: enabled
jobs:
@ -41,4 +42,16 @@ jobs:
- uses: actions/checkout@v2
- name: Build and push container
run: docker buildx build --push --pull --platform "linux/amd64,linux/arm64,linux/arm/v7" --cache-from "$CONTAINER_NAME" --tag "$CONTAINER_NAME" .
run: |
docker buildx build --push --pull \
--platform "linux/amd64,linux/arm64,linux/arm/v7" \
--cache-from "$CACHE_NAME" \
--tag "$CACHENAME" --target unzip .
- name: Build and push container
run: |
docker buildx build --push --pull \
--platform "linux/amd64,linux/arm64,linux/arm/v7" \
--cache-from "$CACHE_NAME" \
--cache-from "$CONTAINER_NAME" \
--tag "$CONTAINER_NAME" .