Skip to content

use 258ab59196f6952756a0285fcd92100317035a03 in builder #2512

use 258ab59196f6952756a0285fcd92100317035a03 in builder

use 258ab59196f6952756a0285fcd92100317035a03 in builder #2512

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);