Skip to content

Commit

Permalink
gh-actions/cache/restore: Add GCS caching (#2444)
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Northey <[email protected]>
  • Loading branch information
phlax authored Nov 11, 2024
1 parent a35f9f0 commit d92473e
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions gh-actions/cache/restore/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ inputs:
command:
type: string
default:
gcs-bucket:
type: string
default:
owner:
type: string
default: runner:docker
Expand Down Expand Up @@ -42,11 +45,20 @@ runs:
fi
shell: bash
- name: Restore cache
if: ${{ ! inputs.gcs-bucket }}
id: cache-restore
uses: actions/cache/restore@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2
with:
path: ${{ inputs.path || inputs.path-tmp }}
key: ${{ inputs.key }}
- name: Restore GCS cache
if: ${{ inputs.gcs-bucket }}
id: cache-restore-gcs
uses: envoyproxy/toolshed/gh-actions/gcs/cache/restore@d8e47b8bd43d567f99c94b7fdf8e6f95b4890768
with:
bucket: ${{ inputs.gcs-bucket }}
path: ${{ inputs.path || inputs.path-tmp }}
key: ${{ inputs.key }}
- run: |
# Create cache script
cat <<'EOF' >> "${{ inputs.path-script }}"
Expand Down

0 comments on commit d92473e

Please sign in to comment.