Skip to content

Commit

Permalink
Add GH supported cache restore method for public runners
Browse files Browse the repository at this point in the history
  • Loading branch information
kenariosz committed Feb 12, 2025
1 parent 762348c commit a622d85
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 3 deletions.
11 changes: 9 additions & 2 deletions load_cached_testplan/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ outputs:
runs:
using: "composite"
steps:
- name: Load cached testplan
- name: Load cached testplan from S3
if: ${{ inputs.runs_on != '"ubuntu-latest"'}}
id: load_testplan_cache
uses: tespkg/actions-cache/restore@v1
with:
Expand All @@ -80,7 +81,13 @@ runs:
accessKey: ${{ inputs.cache_access_key }}
secretKey: ${{ inputs.cache_secret_key }}
bucket: ${{ inputs.cache_bucket }}

- name: Load cached testplan from Github
if: ${{ inputs.runs_on == '"ubuntu-latest"'}}
uses: actions/cache/save@v4
with:
path: |
${{ inputs.plan_folder }}/*
key: '${{ steps.ltp.outputs.init_cache_name }}'
- name: Confirm successful restore
shell: bash
run: |
Expand Down
12 changes: 11 additions & 1 deletion start_shop/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ inputs:
runs:
using: "composite"
steps:
- name: Load cached shop from cache
- name: Load cached shop from S3
if: ${{ inputs.runs_on != '"ubuntu-latest"'}}
id: load_installed_shop
uses: tespkg/actions-cache/restore@v1
with:
Expand All @@ -73,6 +74,15 @@ runs:
secretKey: ${{ inputs.cache_secret_key }}
bucket: ${{ inputs.cache_bucket }}

- name: Load cached testplan from Github
if: ${{ inputs.runs_on == '"ubuntu-latest"'}}
id: load_installed_shop
uses: actions/cache/restore@v4
with:
path: |
./*
key: ${{ inputs.cached_shop }}

- name: Confirm restore
shell: bash
run: |
Expand Down

0 comments on commit a622d85

Please sign in to comment.