feat: add stack-authority action and generalize backend discovery (#568) #5319
This file contains hidden or 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: [ARM64] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - uses: ./.github/actions/get-github-ref-names | |
| id: refs | |
| - name: Calculate Cache-From | |
| id: cache-from | |
| uses: actions/github-script@v8 | |
| 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); |