-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace slashes in ref with underscores to prevent the creation of ne…
…edless subdirs
- Loading branch information
Showing
1 changed file
with
12 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,7 +25,17 @@ runs: | |
# | ||
# Cache setup for our own repo | ||
# Stores the cache on a self-hosted S3 instance based on cache name and suffixed by the git ref | ||
# example: editor_debug_linux_x86_64-refs/heads/master | ||
# example: editor_debug_linux_x86_64-refs_heads_master | ||
|
||
- name: Prepare GitHub ref | ||
if: ${{ inputs.s3-host != '' }} | ||
id: prepare_ref | ||
uses: actions/github-script@v6 | ||
with: | ||
script: | | ||
const ref = process.env.GITHUB_REF.replace(/\//g, '_'); | ||
core.exportVariable('PREPARED_REF', ref); | ||
- name: Setup s3 cache | ||
if: ${{ inputs.s3-host != '' }} | ||
uses: philiplehmann/[email protected] | ||
|
@@ -36,7 +46,7 @@ runs: | |
accessKey: ${{inputs.s3-user}} # required | ||
secretKey: ${{inputs.s3-password}} # required | ||
bucket: ${{inputs.s3-bucket}} # required | ||
key: ${{ inputs.key }}-${{github.ref}} | ||
key: ${{ inputs.key }}-${{ env.PREPARED_REF }} | ||
path: ${{ inputs.path }} | ||
|
||
|
||
|