Skip to content

Commit

Permalink
Move get-cache required env vars back to github-script
Browse files Browse the repository at this point in the history
  • Loading branch information
AndesKrrrrrrrrrrr committed Jan 9, 2025
1 parent ace662d commit 4d338fd
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions .github/actions/get-cache/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,17 @@ runs:
using: 'composite'
steps:
- name: Adding required env vars
shell: bash
# Skip when running locally
if: ${{ !env.ACT }}
uses: actions/github-script@v7
env:
CACHE_URL: ${{ github.event.localrun && env.ACTIONS_CACHE_URL || inputs.cache-url }}
run: |
set -x
echo "ACTIONS_CACHE_URL=$CACHE_URL" >>"$GITHUB_ENV"
echo "ACTIONS_RUNTIME_TOKEN=$ACTIONS_RUNTIME_TOKEN" >>"$GITHUB_ENV"
echo "ACTIONS_RUNTIME_URL=$ACTIONS_RUNTIME_URL" >>"$GITHUB_ENV"
cache-url: ${{ github.event.localrun && env.ACTIONS_CACHE_URL || inputs.cache-url }}
github-token: ${{ inputs.GITHUB_TOKEN }}
with:
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env['cache-url'])
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env['ACTIONS_RUNTIME_TOKEN'])
core.exportVariable('ACTIONS_RUNTIME_URL', process.env['ACTIONS_RUNTIME_URL'])
- name: Get cache
id: prepare
shell: bash
Expand Down

0 comments on commit 4d338fd

Please sign in to comment.