Skip to content

fix: registry cache importer requires ref #20

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 8, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ on: # yamllint disable-line rule:truthy

jobs:
build:
name: Build
runs-on: ubuntu-latest
strategy:
fail-fast: false
Expand Down Expand Up @@ -85,19 +84,21 @@ jobs:
context: ./dist/dev/${{ env.TEMPLATE }}
load: true
tags: ${{ steps.meta.outputs.tags }}
cache-from: type=registry,ref=${{ env.IMAGE_TAG }}
cache-to: type=inline
# cache-from: type=registry,ref=${{ env.IMAGE_TAG }}
# cache-to: type=inline
labels: ${{ steps.meta.outputs.labels }}

- name: Test Docker Release Image
if: success() && startsWith(github.ref, 'refs/tags/')
run: |
IMAGE_TAG=${{ env.IMAGE_NAMESPACE }}:${{ env.TEMPLATE }}-${{ env.VERSION }} make test
echo "IMAGE_TAG=${IMAGE_TAG}" >> $GITHUB_ENV

- name: Test Docker Master Image
if: success() && ! startsWith(github.ref, 'refs/tags/')
run: |
IMAGE_TAG=${{ env.IMAGE_NAMESPACE }}:${{ env.TEMPLATE }}-latest make test
echo "IMAGE_TAG=${IMAGE_TAG}" >> $GITHUB_ENV

- name: Push Docker Image
uses: docker/build-push-action@v3
Expand All @@ -107,7 +108,7 @@ jobs:
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
cache-from: type=registry,ref=${{ env.IMAGE_TAG }}
cache-to: type=inline
# cache-from: type=registry,ref=${{ env.IMAGE_TAG }}
# cache-to: type=inline

...