Skip to content

Commit

Permalink
Merge pull request #1364 from product-os/kyle/empty-cache-from
Browse files Browse the repository at this point in the history
Combine test and cache metadata to prevent empty cache-from values
  • Loading branch information
flowzone-app[bot] authored Feb 10, 2025
2 parents 97db2ee + 3509ad9 commit e181d6d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 35 deletions.
18 changes: 2 additions & 16 deletions .github/workflows/flowzone.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 1 addition & 19 deletions flowzone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -440,23 +440,6 @@
labels: |
org.opencontainers.image.version=${{ needs.versioned_source.outputs.semver }}
org.opencontainers.image.ref.name=${{ matrix.target }}
tags: |
type=raw,value=${{ github.event.pull_request.head.sha }}
type=raw,value=build-${{ github.event.pull_request.head.sha }}
type=raw,value=build-${{ github.event.pull_request.head.ref }}
flavor: |
latest=true
prefix=${{ steps.strings.outputs.prefix }}
suffix=${{ steps.strings.outputs.suffix }}
- &dockerCacheFromMetadata
<<: *dockerTestMetadata
id: cache_meta
# ensure docker_images_crlf is not an empty list
if: needs.is_docker.outputs.docker_images_crlf != ''
with:
images: |
${{ needs.is_docker.outputs.docker_images_crlf }}
tags: |
type=raw,value=${{ github.base_ref || github.ref_name }}
type=raw,value=${{ github.event.pull_request.head.sha }}
Expand Down Expand Up @@ -3185,7 +3168,6 @@ jobs:
yq . "${COMPOSE_FILE}"
- *dockerTestMetadata
- *dockerCacheFromMetadata

# Tell the kernel to use hardware execution for
# cp15 barrier instructions for arm builds running on
Expand Down Expand Up @@ -3217,7 +3199,7 @@ jobs:
*.platform=${{ matrix.platform }}
*.cache-to=type=gha,mode=max,scope=${{ matrix.target }}-${{ matrix.platform }}
*.cache-from=type=gha,scope=${{ matrix.target }}-${{ matrix.platform }}
*.cache-from=${{join(fromJSON(steps.cache_meta.outputs.json || '{}').tags || fromJSON('[]'),',')}}
*.cache-from=${{join(fromJSON(steps.test_meta.outputs.json || '{}').tags || fromJSON('[]'),',')}}
load: true
provenance: false

Expand Down

0 comments on commit e181d6d

Please sign in to comment.