feat: pass along args to allow a happy deploy from a diff repo (#227) #1728
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
on: | |
pull_request: {} | |
push: {} | |
delete: {} | |
name: Test Get GitHub Ref Names | |
jobs: | |
test-github-ref-names: | |
runs-on: [self-hosted, ARM64] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: ./.github/actions/get-github-ref-names | |
id: refs | |
- name: Calculate Cache-From | |
id: cache-from | |
uses: actions/[email protected] | |
with: | |
script: | | |
let cacheFrom = [ | |
"${{ steps.refs.outputs.baseRef }}", | |
"${{ steps.refs.outputs.headRef }}", | |
].map(ref => ref.replaceAll(/[^a-zA-Z0-9/-]+/g, "-")) | |
.map(ref => `type=registry,ref=foo/bar:branch-${ref}`).join(', '); | |
console.log(`Will use cached images from ${JSON.stringify(cacheFrom, null, 2)}`); | |
core.setOutput("cacheFrom", cacheFrom); |