Skip to content

Commit

Permalink
Update cache scoping in GitHub Action workflows
Browse files Browse the repository at this point in the history
This commit modifies the cache scoping in the GitHub Actions workflow file to be specific to the target and PHP version. This change improves the cache handling by ensuring that each PHP version's cache for a specific target is unique, thus avoiding potential conflicts between different versions.
  • Loading branch information
nbejansen committed Feb 6, 2024
1 parent 7461043 commit 84de8cc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/build-and-test-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ jobs:
load: true
target: ${{ inputs.target }}
tags: ghcr.io/sitepilot/php-${{ inputs.target }}:build
cache-from: type=gha
cache-to: type=gha,mode=max
cache-from: type=gha,scope=php-${{ inputs.target }}-${{ matrix.php }}
cache-to: type=gha,mode=max,scope=php-${{ inputs.target }}-${{ matrix.php }}
build-args: |
PHP_VERSION=${{ matrix.php }}
Expand All @@ -73,8 +73,8 @@ jobs:
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64, linux/arm64
cache-from: type=gha
cache-to: type=gha,mode=max
cache-from: type=gha,scope=php-${{ inputs.target }}-${{ matrix.php }}
cache-to: type=gha,mode=max,scope=php-${{ inputs.target }}-${{ matrix.php }}
provenance: false
build-args: |
PHP_VERSION=${{ matrix.php }}

0 comments on commit 84de8cc

Please sign in to comment.