Skip to content

Commit

Permalink
Merge pull request #870 from nanasess/fix-docker-build-cache
Browse files Browse the repository at this point in the history
dockerbuild workflow のみキャッシュを保存し、テスト実行時はキャッシュを保存しない
  • Loading branch information
nanasess authored Mar 23, 2024
2 parents 33f507d + defc1df commit bce476d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/actions/dockerbuild/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ inputs:
description: 'Docker registry to push to'
default: 'ghcr.io'
required: true
cache-to:
description: 'Add the Docker build layer to the cache'
default: ~
required: false

runs:
using: "composite"
Expand Down Expand Up @@ -60,7 +64,7 @@ runs:
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha,scope=php-${{ inputs.php-version }}
cache-to: type=gha,mode=max,scope=php-${{ inputs.php-version }}
cache-to: ${{ inputs.cache-to }}
build-args: |
PHP_VERSION_TAG=${{ inputs.php-version }}
GD_OPTIONS=${{ env.GD_OPTIONS }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/dockerbuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,4 @@ jobs:
uses: ./.github/actions/dockerbuild
with:
php-version: ${{ matrix.php }}
cache-to: type=gha,mode=max,scope=php-${{ matrix.php }}

0 comments on commit bce476d

Please sign in to comment.