From 9ec3abbd6430235bf7db8d303005ade58f3b37cd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Jul 2024 07:56:06 -0400 Subject: [PATCH 01/25] Bump actions/checkout from 4.1.6 to 4.1.7 (#137) --- .github/workflows/CI.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index d1e0c5a..8a4a726 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -59,7 +59,7 @@ jobs: env: JULIA_DEPOT_PATH: /tmp/julia-depot steps: - - uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 + - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 - name: Set cache-name id: cache-name shell: bash @@ -117,7 +117,7 @@ jobs: env: JULIA_DEPOT_PATH: /tmp/julia-depot steps: - - uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 + - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 - uses: julia-actions/setup-julia@v2 with: version: ${{ matrix.version }} @@ -161,7 +161,7 @@ jobs: outputs: cache-name: ${{ steps.cache-name.outputs.cache-name }} steps: - - uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 + - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 - name: Set cache-name id: cache-name run: | @@ -193,7 +193,7 @@ jobs: needs: test-save-nomatrix runs-on: ubuntu-latest steps: - - uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 + - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 - name: Restore cache id: cache uses: ./ @@ -233,7 +233,7 @@ jobs: outputs: cache-name: ${{ steps.cache-name.outputs.cache-name }} steps: - - uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 + - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 - name: Set cache-name id: cache-name run: | @@ -259,7 +259,7 @@ jobs: needs: test-save-cloned-registry runs-on: ubuntu-latest steps: - - uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 + - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 - name: Add General registry clone shell: julia --color=yes {0} run: | From e7913c2cb93bea16cc88abf47e27c950182cbd99 Mon Sep 17 00:00:00 2001 From: Ian Butterworth Date: Mon, 12 Aug 2024 16:01:44 +0200 Subject: [PATCH 02/25] update any cached registries (#140) * update any cached registries * add comment * handle really old julia versions * Update action.yml Co-authored-by: Curtis Vogt --------- Co-authored-by: Curtis Vogt --- action.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/action.yml b/action.yml index 4a0852f..c0d308f 100644 --- a/action.yml +++ b/action.yml @@ -132,6 +132,22 @@ runs: du -shc ${{ steps.paths.outputs.depot }}/* || true shell: bash + # issue https://github.com/julia-actions/cache/issues/110 + # Pkg may not run `Registry.update()` if a manifest exists, which may exist because of a + # `Pkg.dev` call or because one is added to the repo. So be safe and update cached registries here. + # Older (~v1.0) versions of julia that don't have `Pkg.Registry.update()` seem to always update registries in + # Pkg operations. So this is only necessary for newer julia versions. + - name: Update any cached registries + if: ${{ inputs.cache-registries == 'true' }} + run: | + if [ -d "${{ steps.paths.outputs.depot }}/registries" ] && [ -n "$(ls -A "${{ steps.paths.outputs.depot }}/registries")" ]; then + echo "Registries directory exists and is non-empty. Updating any registries" + julia -e "import Pkg; isdefined(Pkg, :Registry) && Pkg.Registry.update();" + else + echo "Registries directory does not exist or is empty. Skipping registry update" + fi + shell: bash + # GitHub actions cache entries are immutable and cannot be updated. In order to have both the Julia # depot cache be up-to-date and avoid storing redundant cache entries we'll manually cleanup old # cache entries before the new cache is saved. However, we need to be careful with our manual From e662c423976f25dc5bc17c4f828baf7ca9336e33 Mon Sep 17 00:00:00 2001 From: Curtis Vogt Date: Fri, 30 Aug 2024 07:54:55 -0500 Subject: [PATCH 03/25] Expand paths which use tilde (#141) --- action.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/action.yml b/action.yml index c0d308f..1e26369 100644 --- a/action.yml +++ b/action.yml @@ -66,6 +66,7 @@ runs: else depot="~/.julia" fi + depot="${depot/#\~/$HOME}" # Expand tilde which cannot be used in BASH checks (i.e. `[ -d "~/.julia" ]` fails) echo "depot=$depot" | tee -a "$GITHUB_OUTPUT" cache_paths=() @@ -75,7 +76,7 @@ runs: [ "${{ inputs.cache-packages }}" = "true" ] && cache_paths+=("$packages_path") registries_path="${depot}/registries" if [ "${{ inputs.cache-registries }}" = "true" ]; then - if [ ! -d "${registries_path/#\~/$HOME}" ]; then + if [ ! -d "${registries_path}" ]; then cache_paths+=("$registries_path") else echo "::warning::Julia depot registries already exist. Skipping restoring of cached registries to avoid potential merge conflicts when updating. Please ensure that \`julia-actions/cache\` precedes any workflow steps which add registries." From 8608484607cba0bdb5437a7bad85d6502499d029 Mon Sep 17 00:00:00 2001 From: Ian Butterworth Date: Sat, 31 Aug 2024 07:35:05 -0400 Subject: [PATCH 04/25] Soft fail registry update (#143) --- action.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/action.yml b/action.yml index 1e26369..2d2a1b1 100644 --- a/action.yml +++ b/action.yml @@ -140,6 +140,7 @@ runs: # Pkg operations. So this is only necessary for newer julia versions. - name: Update any cached registries if: ${{ inputs.cache-registries == 'true' }} + continue-on-error: true run: | if [ -d "${{ steps.paths.outputs.depot }}/registries" ] && [ -n "$(ls -A "${{ steps.paths.outputs.depot }}/registries")" ]; then echo "Registries directory exists and is non-empty. Updating any registries" From 824243901fb567ccb490b0d0e2483ccecde46834 Mon Sep 17 00:00:00 2001 From: Ian Butterworth Date: Mon, 23 Sep 2024 13:30:40 -0400 Subject: [PATCH 05/25] fix windows depot path expansion (#146) --- action.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 2d2a1b1..046a7d8 100644 --- a/action.yml +++ b/action.yml @@ -66,7 +66,11 @@ runs: else depot="~/.julia" fi - depot="${depot/#\~/$HOME}" # Expand tilde which cannot be used in BASH checks (i.e. `[ -d "~/.julia" ]` fails) + if [[ "$OSTYPE" == "msys" || "$OSTYPE" == "cygwin" ]]; then + depot="${depot/#\~/$USERPROFILE}" # Windows paths + else + depot="${depot/#\~/$HOME}" # Unix-like paths + fi echo "depot=$depot" | tee -a "$GITHUB_OUTPUT" cache_paths=() From 0c8892ce7f5286e9dedf95f70c10aca69cbb47f1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 1 Dec 2024 13:47:49 +0000 Subject: [PATCH 06/25] Bump dcarbone/install-jq-action from 2.1.0 to 3.0.1 (#155) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Bump dcarbone/install-jq-action from 2.1.0 to 3.0.1 Bumps [dcarbone/install-jq-action](https://github.com/dcarbone/install-jq-action) from 2.1.0 to 3.0.1. - [Release notes](https://github.com/dcarbone/install-jq-action/releases) - [Commits](https://github.com/dcarbone/install-jq-action/compare/8867ddb4788346d7c22b72ea2e2ffe4d514c7bcb...e397bd87438d72198f81efd21f876461183d383a) --- updated-dependencies: - dependency-name: dcarbone/install-jq-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] * Update action.yml --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Mosè Giordano <765740+giordano@users.noreply.github.com> --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 046a7d8..03c21ca 100644 --- a/action.yml +++ b/action.yml @@ -52,7 +52,7 @@ runs: using: 'composite' steps: - name: Install jq - uses: dcarbone/install-jq-action@8867ddb4788346d7c22b72ea2e2ffe4d514c7bcb + uses: dcarbone/install-jq-action@e397bd87438d72198f81efd21f876461183d383a # v3.0.1 with: force: false # Skip install when an existing `jq` is present From f4098e6050eda86d84506a0bd31703789661bf0e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 1 Dec 2024 13:48:31 +0000 Subject: [PATCH 07/25] Bump actions/cache from 4.0.2 to 4.1.2 (#151) Bumps [actions/cache](https://github.com/actions/cache) from 4.0.2 to 4.1.2. - [Release notes](https://github.com/actions/cache/releases) - [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md) - [Commits](https://github.com/actions/cache/compare/0c45773b623bea8c8e75f6c82b208c3cf94ea4f9...6849a6489940f00c2f30c0fb92c6274307ccb58a) --- updated-dependencies: - dependency-name: actions/cache dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 03c21ca..885da78 100644 --- a/action.yml +++ b/action.yml @@ -120,7 +120,7 @@ runs: env: MATRIX_JSON: ${{ toJSON(matrix) }} - - uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2 + - uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 id: cache with: path: | From 315c171d1759e1be446c98b288e857891a1f7246 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 1 Dec 2024 21:41:35 +0000 Subject: [PATCH 08/25] Bump actions/checkout from 4.1.7 to 4.2.2 (#150) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Bump actions/checkout from 4.1.7 to 4.2.2 Bumps [actions/checkout](https://github.com/actions/checkout) from 4.1.7 to 4.2.2. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/692973e3d937129bcbf40652eb9f2f61becf3332...11bd71901bbe5b1630ceea73d27597364c9af683) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * Apply suggestions from code review --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Mosè Giordano <765740+giordano@users.noreply.github.com> --- .github/workflows/CI.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 8a4a726..1c78b99 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -59,7 +59,7 @@ jobs: env: JULIA_DEPOT_PATH: /tmp/julia-depot steps: - - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - name: Set cache-name id: cache-name shell: bash @@ -117,7 +117,7 @@ jobs: env: JULIA_DEPOT_PATH: /tmp/julia-depot steps: - - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - uses: julia-actions/setup-julia@v2 with: version: ${{ matrix.version }} @@ -161,7 +161,7 @@ jobs: outputs: cache-name: ${{ steps.cache-name.outputs.cache-name }} steps: - - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - name: Set cache-name id: cache-name run: | @@ -193,7 +193,7 @@ jobs: needs: test-save-nomatrix runs-on: ubuntu-latest steps: - - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - name: Restore cache id: cache uses: ./ @@ -233,7 +233,7 @@ jobs: outputs: cache-name: ${{ steps.cache-name.outputs.cache-name }} steps: - - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - name: Set cache-name id: cache-name run: | @@ -259,7 +259,7 @@ jobs: needs: test-save-cloned-registry runs-on: ubuntu-latest steps: - - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - name: Add General registry clone shell: julia --color=yes {0} run: | From d343189aad1dc9a40be85e22f75c3b81a562a969 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 1 Jan 2025 11:41:51 +0100 Subject: [PATCH 09/25] Bump actions/cache from 4.1.2 to 4.2.0 (#156) Bumps [actions/cache](https://github.com/actions/cache) from 4.1.2 to 4.2.0. - [Release notes](https://github.com/actions/cache/releases) - [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md) - [Commits](https://github.com/actions/cache/compare/6849a6489940f00c2f30c0fb92c6274307ccb58a...1bd1e32a3bdc45362d1e726936510720a7c30a57) --- updated-dependencies: - dependency-name: actions/cache dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 885da78..a97a89e 100644 --- a/action.yml +++ b/action.yml @@ -120,7 +120,7 @@ runs: env: MATRIX_JSON: ${{ toJSON(matrix) }} - - uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 + - uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 id: cache with: path: | From 49fd7c4af0ad5378a449b2488d80c2d304d36c70 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 9 Jan 2025 13:06:18 -0500 Subject: [PATCH 10/25] Bump pyTooling/Actions from 1.0.5 to 3.1.1 (#157) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Ian Butterworth --- action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/action.yml b/action.yml index a97a89e..fa59c06 100644 --- a/action.yml +++ b/action.yml @@ -171,7 +171,7 @@ runs: # - https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#usage-limits-and-eviction-policy # Not windows - - uses: pyTooling/Actions/with-post-step@e9d0dc3dba9fda45f195946858708f60c0240caf # v1.0.5 + - uses: pyTooling/Actions/with-post-step@9ceefdbf5dceae8c441fc393ed82344c7ca8bbdb # v3.1.1 if: ${{ inputs.delete-old-caches != 'false' && github.ref != format('refs/heads/{0}', github.event.repository.default_branch) && runner.OS != 'Windows' }} @@ -184,7 +184,7 @@ runs: GH_TOKEN: ${{ inputs.token }} # Windows (because this action uses command prompt on windows) - - uses: pyTooling/Actions/with-post-step@e9d0dc3dba9fda45f195946858708f60c0240caf # v1.0.5 + - uses: pyTooling/Actions/with-post-step@9ceefdbf5dceae8c441fc393ed82344c7ca8bbdb # v3.1.1 if: ${{ inputs.delete-old-caches != 'false' && github.ref != format('refs/heads/{0}', github.event.repository.default_branch) && runner.OS == 'Windows' }} From 2b1bf4d8a138668ac719ea7ca149b53ed8d8401e Mon Sep 17 00:00:00 2001 From: Ian Butterworth Date: Thu, 9 Jan 2025 14:23:45 -0500 Subject: [PATCH 11/25] fix slashes in windows depot path (#153) --- action.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/action.yml b/action.yml index fa59c06..ff56197 100644 --- a/action.yml +++ b/action.yml @@ -68,6 +68,7 @@ runs: fi if [[ "$OSTYPE" == "msys" || "$OSTYPE" == "cygwin" ]]; then depot="${depot/#\~/$USERPROFILE}" # Windows paths + depot="${depot//\\//}" # Replace backslashes with forward slashes else depot="${depot/#\~/$HOME}" # Unix-like paths fi From 9b3f75eff34c4a1900d4519d2879fb7b6c039f3b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 1 Mar 2025 07:28:08 +0000 Subject: [PATCH 12/25] Bump actions/cache from 4.2.0 to 4.2.2 (#165) Bumps [actions/cache](https://github.com/actions/cache) from 4.2.0 to 4.2.2. - [Release notes](https://github.com/actions/cache/releases) - [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md) - [Commits](https://github.com/actions/cache/compare/1bd1e32a3bdc45362d1e726936510720a7c30a57...d4323d4df104b026a6aa633fdb11d772146be0bf) --- updated-dependencies: - dependency-name: actions/cache dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index ff56197..9f36d62 100644 --- a/action.yml +++ b/action.yml @@ -121,7 +121,7 @@ runs: env: MATRIX_JSON: ${{ toJSON(matrix) }} - - uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 + - uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2 id: cache with: path: | From e5a7946b4f1fc1728d2ff33c578ca4a7c7ef3ae4 Mon Sep 17 00:00:00 2001 From: John Omotani Date: Fri, 14 Mar 2025 00:59:46 +0000 Subject: [PATCH 13/25] Link to Github caching docs from README.md (#167) This can be useful for non-expert users. --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 47794e3..d3ea74b 100644 --- a/README.md +++ b/README.md @@ -64,6 +64,9 @@ By default, this action removes caches that were previously made by jobs on the GitHub automatically removes old caches after a certain period or when the repository cache allocation is full. It is, however, more efficient to explicitly remove old caches to improve caching for less frequently run jobs. +For more information about Github caching generically, for example how to manually delete caches, see +[this Github documentation page](https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/caching-dependencies-to-speed-up-workflows#managing-caches). + ### Cache keys The cache key that the cache will be saved as is based on: From c231b4e8c0597efc70eaca853a643bcdc16d8bbb Mon Sep 17 00:00:00 2001 From: Penelope Yong Date: Tue, 1 Apr 2025 16:08:42 +0100 Subject: [PATCH 14/25] Output cache-paths and cache-key as well (#169) --- action.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/action.yml b/action.yml index 9f36d62..15e8697 100644 --- a/action.yml +++ b/action.yml @@ -47,6 +47,12 @@ outputs: cache-hit: description: A boolean value to indicate an exact match was found for the primary key. Returns "" when the key is new. Forwarded from actions/cache. value: ${{ steps.hit.outputs.cache-hit }} + cache-paths: + description: The paths that were cached + value: ${{ steps.paths.outputs.cache-paths }} + cache-key: + description: The full cache key used + value: ${{ steps.keys.outputs.key }} runs: using: 'composite' From c1893486c97cf452a539e01a8b0c9bba2ed345f9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 1 Apr 2025 11:09:06 -0400 Subject: [PATCH 15/25] Bump actions/cache from 4.2.2 to 4.2.3 (#172) Bumps [actions/cache](https://github.com/actions/cache) from 4.2.2 to 4.2.3. - [Release notes](https://github.com/actions/cache/releases) - [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md) - [Commits](https://github.com/actions/cache/compare/d4323d4df104b026a6aa633fdb11d772146be0bf...5a3ec84eff668545956fd18022155c47e93e2684) --- updated-dependencies: - dependency-name: actions/cache dependency-version: 4.2.3 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 15e8697..496c33b 100644 --- a/action.yml +++ b/action.yml @@ -127,7 +127,7 @@ runs: env: MATRIX_JSON: ${{ toJSON(matrix) }} - - uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2 + - uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3 id: cache with: path: | From 1f7b6e036ededd192fd840e190d9c75710d0d32f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 1 Apr 2025 11:09:30 -0400 Subject: [PATCH 16/25] Bump dcarbone/install-jq-action from 3.0.1 to 3.1.1 (#171) Bumps [dcarbone/install-jq-action](https://github.com/dcarbone/install-jq-action) from 3.0.1 to 3.1.1. - [Release notes](https://github.com/dcarbone/install-jq-action/releases) - [Commits](https://github.com/dcarbone/install-jq-action/compare/e397bd87438d72198f81efd21f876461183d383a...f0e10f46ff84f4d32178b4b76e1ef180b16f82c3) --- updated-dependencies: - dependency-name: dcarbone/install-jq-action dependency-version: 3.1.1 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 496c33b..5d5f639 100644 --- a/action.yml +++ b/action.yml @@ -58,7 +58,7 @@ runs: using: 'composite' steps: - name: Install jq - uses: dcarbone/install-jq-action@e397bd87438d72198f81efd21f876461183d383a # v3.0.1 + uses: dcarbone/install-jq-action@f0e10f46ff84f4d32178b4b76e1ef180b16f82c3 # v3.1.1 with: force: false # Skip install when an existing `jq` is present From d10a6fd8f31b12404a54613ebad242900567f2b9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 1 Apr 2025 11:10:04 -0400 Subject: [PATCH 17/25] Bump pyTooling/Actions from 3.1.1 to 4.2.2 (#170) Bumps [pyTooling/Actions](https://github.com/pytooling/actions) from 3.1.1 to 4.2.2. - [Release notes](https://github.com/pytooling/actions/releases) - [Changelog](https://github.com/pyTooling/Actions/blob/dev/doc/Releases.rst) - [Commits](https://github.com/pytooling/actions/compare/9ceefdbf5dceae8c441fc393ed82344c7ca8bbdb...42e17fae05f224e5ac3d79d021a4e3577878efe5) --- updated-dependencies: - dependency-name: pyTooling/Actions dependency-version: 4.2.2 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/action.yml b/action.yml index 5d5f639..788f29b 100644 --- a/action.yml +++ b/action.yml @@ -178,7 +178,7 @@ runs: # - https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#usage-limits-and-eviction-policy # Not windows - - uses: pyTooling/Actions/with-post-step@9ceefdbf5dceae8c441fc393ed82344c7ca8bbdb # v3.1.1 + - uses: pyTooling/Actions/with-post-step@42e17fae05f224e5ac3d79d021a4e3577878efe5 # v4.2.2 if: ${{ inputs.delete-old-caches != 'false' && github.ref != format('refs/heads/{0}', github.event.repository.default_branch) && runner.OS != 'Windows' }} @@ -191,7 +191,7 @@ runs: GH_TOKEN: ${{ inputs.token }} # Windows (because this action uses command prompt on windows) - - uses: pyTooling/Actions/with-post-step@9ceefdbf5dceae8c441fc393ed82344c7ca8bbdb # v3.1.1 + - uses: pyTooling/Actions/with-post-step@42e17fae05f224e5ac3d79d021a4e3577878efe5 # v4.2.2 if: ${{ inputs.delete-old-caches != 'false' && github.ref != format('refs/heads/{0}', github.event.repository.default_branch) && runner.OS == 'Windows' }} From d9e495f279561ca09700a984275777ea5524d28c Mon Sep 17 00:00:00 2001 From: Penelope Yong Date: Sat, 5 Apr 2025 02:53:34 +0100 Subject: [PATCH 18/25] Add manual cache save to README (#173) --- README.md | 37 +++++++++++++++++++++++++++++++++++-- 1 file changed, 35 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d3ea74b..b89cb3a 100644 --- a/README.md +++ b/README.md @@ -51,6 +51,8 @@ By default all depot directories called out below are cached. ### Outputs - `cache-hit` - A boolean value to indicate an exact match was found for the primary key. Returns \"\" when the key is new. Forwarded from actions/cache. +- `cache-paths` - A list of paths (as a newline-separated string) that were cached. +- `cache-key` - The cache key that was used for this run. ## How It Works @@ -64,8 +66,8 @@ By default, this action removes caches that were previously made by jobs on the GitHub automatically removes old caches after a certain period or when the repository cache allocation is full. It is, however, more efficient to explicitly remove old caches to improve caching for less frequently run jobs. -For more information about Github caching generically, for example how to manually delete caches, see -[this Github documentation page](https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/caching-dependencies-to-speed-up-workflows#managing-caches). +For more information about GitHub caching generically, for example how to manually delete caches, see +[this GitHub documentation page](https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/caching-dependencies-to-speed-up-workflows#managing-caches). ### Cache keys @@ -104,6 +106,37 @@ Which means your caches files will not grow needlessly. GitHub also deletes cach To disable deletion set input `delete-old-caches: 'false'`. +### Caching even if an intermediate job fails + +Just like [the basic actions/cache workflow](https://github.com/actions/cache), this action has a cache restore step, and also a save step which runs after the workflow completes. +By default, if any job in the workflow fails, the entire workflow will be stopped, and the cache will not be saved. + +Due to current limitations in GitHub Actions syntax, there is no built-in option for this action to save the cache even if the job fails. +However, it does output information which you can feed into `actions/cache` yourself to achieve the same effect. +For example, this workflow will ensure that the cache is saved if a step fails (but skipping it if the cache was hit, i.e. there's no need to cache it again). + +```yaml + steps: + - uses: actions/checkout@v4 + + - name: Load Julia packages from cache + id: julia-cache + uses: julia-actions/cache@v2 + with: + cache-name: foo + + # do whatever you want here (that might fail) + + - name: Save Julia depot cache on failure + id: julia-cache-save + if: failure() && steps.julia-cache.outputs.cache-hit != 'true' + uses: actions/cache/save@v4 + with: + path: | + ${{ steps.julia-cache.outputs.cache-paths }} + key: ${{ steps.julia-cache.outputs.cache-key }} +``` + ### Cache Garbage Collection Caches are restored and re-saved after every run, retaining the state of the depot throughout runs. From 2c5c26f9c82b8933d1e963df099b1757a37065db Mon Sep 17 00:00:00 2001 From: Ian Butterworth Date: Tue, 15 Apr 2025 22:00:01 -0400 Subject: [PATCH 19/25] Fix retry on failure/cancelled example (#174) --- README.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index b89cb3a..c6c9930 100644 --- a/README.md +++ b/README.md @@ -122,14 +122,12 @@ For example, this workflow will ensure that the cache is saved if a step fails ( - name: Load Julia packages from cache id: julia-cache uses: julia-actions/cache@v2 - with: - cache-name: foo # do whatever you want here (that might fail) - - name: Save Julia depot cache on failure + - name: Save Julia depot cache on cancel or failure id: julia-cache-save - if: failure() && steps.julia-cache.outputs.cache-hit != 'true' + if: cancelled() || failure() uses: actions/cache/save@v4 with: path: | From 5aaa1e085e327ccae2840afca364a699777759df Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 1 May 2025 09:11:02 +0100 Subject: [PATCH 20/25] Bump pyTooling/Actions from 4.2.2 to 4.3.0 (#176) Bumps [pyTooling/Actions](https://github.com/pytooling/actions) from 4.2.2 to 4.3.0. - [Release notes](https://github.com/pytooling/actions/releases) - [Changelog](https://github.com/pyTooling/Actions/blob/dev/doc/Releases.rst) - [Commits](https://github.com/pytooling/actions/compare/42e17fae05f224e5ac3d79d021a4e3577878efe5...33edd82e6f283fa4bb95cf46eeea4ee24da28f04) --- updated-dependencies: - dependency-name: pyTooling/Actions dependency-version: 4.3.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/action.yml b/action.yml index 788f29b..721b5db 100644 --- a/action.yml +++ b/action.yml @@ -178,7 +178,7 @@ runs: # - https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#usage-limits-and-eviction-policy # Not windows - - uses: pyTooling/Actions/with-post-step@42e17fae05f224e5ac3d79d021a4e3577878efe5 # v4.2.2 + - uses: pyTooling/Actions/with-post-step@33edd82e6f283fa4bb95cf46eeea4ee24da28f04 # v4.3.0 if: ${{ inputs.delete-old-caches != 'false' && github.ref != format('refs/heads/{0}', github.event.repository.default_branch) && runner.OS != 'Windows' }} @@ -191,7 +191,7 @@ runs: GH_TOKEN: ${{ inputs.token }} # Windows (because this action uses command prompt on windows) - - uses: pyTooling/Actions/with-post-step@42e17fae05f224e5ac3d79d021a4e3577878efe5 # v4.2.2 + - uses: pyTooling/Actions/with-post-step@33edd82e6f283fa4bb95cf46eeea4ee24da28f04 # v4.3.0 if: ${{ inputs.delete-old-caches != 'false' && github.ref != format('refs/heads/{0}', github.event.repository.default_branch) && runner.OS == 'Windows' }} From 46d70a0fdf9a635236da6c32ecc85f3982bf7be5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 1 Jul 2025 11:16:03 +0200 Subject: [PATCH 21/25] Bump dcarbone/install-jq-action from 3.1.1 to 3.2.0 (#178) Bumps [dcarbone/install-jq-action](https://github.com/dcarbone/install-jq-action) from 3.1.1 to 3.2.0. - [Release notes](https://github.com/dcarbone/install-jq-action/releases) - [Commits](https://github.com/dcarbone/install-jq-action/compare/f0e10f46ff84f4d32178b4b76e1ef180b16f82c3...b7ef57d46ece78760b4019dbc4080a1ba2a40b45) --- updated-dependencies: - dependency-name: dcarbone/install-jq-action dependency-version: 3.2.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 721b5db..5f10c01 100644 --- a/action.yml +++ b/action.yml @@ -58,7 +58,7 @@ runs: using: 'composite' steps: - name: Install jq - uses: dcarbone/install-jq-action@f0e10f46ff84f4d32178b4b76e1ef180b16f82c3 # v3.1.1 + uses: dcarbone/install-jq-action@b7ef57d46ece78760b4019dbc4080a1ba2a40b45 # v3.2.0 with: force: false # Skip install when an existing `jq` is present From 2d7a7cc44542f1df1178fa8de27d9d5cbbace3e5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Sep 2025 17:51:34 +0200 Subject: [PATCH 22/25] Bump actions/cache from 4.2.3 to 4.2.4 (#180) Bumps [actions/cache](https://github.com/actions/cache) from 4.2.3 to 4.2.4. - [Release notes](https://github.com/actions/cache/releases) - [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md) - [Commits](https://github.com/actions/cache/compare/5a3ec84eff668545956fd18022155c47e93e2684...0400d5f644dc74513175e3cd8d07132dd4860809) --- updated-dependencies: - dependency-name: actions/cache dependency-version: 4.2.4 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 5f10c01..1cfe131 100644 --- a/action.yml +++ b/action.yml @@ -127,7 +127,7 @@ runs: env: MATRIX_JSON: ${{ toJSON(matrix) }} - - uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3 + - uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4 id: cache with: path: | From 79b42d2cc0aa2d537c1502abeeca3ab6d529c47d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Sep 2025 18:08:09 +0200 Subject: [PATCH 23/25] Bump actions/checkout from 4.2.2 to 5.0.0 (#182) Bumps [actions/checkout](https://github.com/actions/checkout) from 4.2.2 to 5.0.0. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/11bd71901bbe5b1630ceea73d27597364c9af683...08c6903cd8c0fde910a37f88322edcfb5dd907a8) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: 5.0.0 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/CI.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 1c78b99..f904a41 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -59,7 +59,7 @@ jobs: env: JULIA_DEPOT_PATH: /tmp/julia-depot steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 - name: Set cache-name id: cache-name shell: bash @@ -117,7 +117,7 @@ jobs: env: JULIA_DEPOT_PATH: /tmp/julia-depot steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 - uses: julia-actions/setup-julia@v2 with: version: ${{ matrix.version }} @@ -161,7 +161,7 @@ jobs: outputs: cache-name: ${{ steps.cache-name.outputs.cache-name }} steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 - name: Set cache-name id: cache-name run: | @@ -193,7 +193,7 @@ jobs: needs: test-save-nomatrix runs-on: ubuntu-latest steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 - name: Restore cache id: cache uses: ./ @@ -233,7 +233,7 @@ jobs: outputs: cache-name: ${{ steps.cache-name.outputs.cache-name }} steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 - name: Set cache-name id: cache-name run: | @@ -259,7 +259,7 @@ jobs: needs: test-save-cloned-registry runs-on: ubuntu-latest steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 - name: Add General registry clone shell: julia --color=yes {0} run: | From 509404de2a728675980e478dd47a375226efe245 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 7 Sep 2025 14:40:22 +0100 Subject: [PATCH 24/25] Bump pyTooling/Actions from 4.3.0 to 5.4.0 (#181) Bumps [pyTooling/Actions](https://github.com/pytooling/actions) from 4.3.0 to 5.4.0. - [Release notes](https://github.com/pytooling/actions/releases) - [Changelog](https://github.com/pyTooling/Actions/blob/dev/doc/Releases.rst) - [Commits](https://github.com/pytooling/actions/compare/33edd82e6f283fa4bb95cf46eeea4ee24da28f04...d6342484cd335d4c9c63d4f52f267c54d5bc3b19) --- updated-dependencies: - dependency-name: pyTooling/Actions dependency-version: 5.4.0 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/action.yml b/action.yml index 1cfe131..f53d407 100644 --- a/action.yml +++ b/action.yml @@ -178,7 +178,7 @@ runs: # - https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#usage-limits-and-eviction-policy # Not windows - - uses: pyTooling/Actions/with-post-step@33edd82e6f283fa4bb95cf46eeea4ee24da28f04 # v4.3.0 + - uses: pyTooling/Actions/with-post-step@d6342484cd335d4c9c63d4f52f267c54d5bc3b19 # v5.4.0 if: ${{ inputs.delete-old-caches != 'false' && github.ref != format('refs/heads/{0}', github.event.repository.default_branch) && runner.OS != 'Windows' }} @@ -191,7 +191,7 @@ runs: GH_TOKEN: ${{ inputs.token }} # Windows (because this action uses command prompt on windows) - - uses: pyTooling/Actions/with-post-step@33edd82e6f283fa4bb95cf46eeea4ee24da28f04 # v4.3.0 + - uses: pyTooling/Actions/with-post-step@d6342484cd335d4c9c63d4f52f267c54d5bc3b19 # v5.4.0 if: ${{ inputs.delete-old-caches != 'false' && github.ref != format('refs/heads/{0}', github.event.repository.default_branch) && runner.OS == 'Windows' }} From 8205b4547a8af611f04117f83ff0b513d77a8a11 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 1 Oct 2025 22:46:25 +0200 Subject: [PATCH 25/25] Bump actions/cache from 4.2.4 to 4.3.0 (#184) Bumps [actions/cache](https://github.com/actions/cache) from 4.2.4 to 4.3.0. - [Release notes](https://github.com/actions/cache/releases) - [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md) - [Commits](https://github.com/actions/cache/compare/0400d5f644dc74513175e3cd8d07132dd4860809...0057852bfaa89a56745cba8c7296529d2fc39830) --- updated-dependencies: - dependency-name: actions/cache dependency-version: 4.3.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index f53d407..f399121 100644 --- a/action.yml +++ b/action.yml @@ -127,7 +127,7 @@ runs: env: MATRIX_JSON: ${{ toJSON(matrix) }} - - uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4 + - uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 id: cache with: path: |