From defc1df6c5fd383e52a579239c94c34417a06756 Mon Sep 17 00:00:00 2001 From: Kentaro Ohkouchi Date: Fri, 22 Mar 2024 20:09:25 +0900 Subject: [PATCH] =?UTF-8?q?dockerbuild=20=E3=81=AE=E3=81=BF=E3=82=AD?= =?UTF-8?q?=E3=83=A3=E3=83=83=E3=82=B7=E3=83=A5=E3=82=92=E4=BF=9D=E5=AD=98?= =?UTF-8?q?=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - テスト実行時の docker build ではキャッシュを保存しない --- .github/actions/dockerbuild/action.yml | 6 +++++- .github/workflows/dockerbuild.yml | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/actions/dockerbuild/action.yml b/.github/actions/dockerbuild/action.yml index 6957de097a..297a65eec1 100644 --- a/.github/actions/dockerbuild/action.yml +++ b/.github/actions/dockerbuild/action.yml @@ -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" @@ -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 }} diff --git a/.github/workflows/dockerbuild.yml b/.github/workflows/dockerbuild.yml index b5686cdb32..5e9cb2c0c9 100644 --- a/.github/workflows/dockerbuild.yml +++ b/.github/workflows/dockerbuild.yml @@ -29,3 +29,4 @@ jobs: uses: ./.github/actions/dockerbuild with: php-version: ${{ matrix.php }} + cache-to: type=gha,mode=max,scope=php-${{ matrix.php }}