test(scorecard): scorecard test for Cryostat CR configuration changes… #54
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
name: test-CI-on-push | |
concurrency: | |
group: ci-${{ github.run_id }} | |
cancel-in-progress: true | |
on: | |
push: | |
branches: | |
- main | |
- v[0-9]+ | |
- v[0-9]+.[0-9]+ | |
- cryostat-v[0-9]+.[0-9]+ | |
jobs: | |
check-before-test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Fail if needs-triage label applied | |
if: ${{ contains(github.event.pull_request.labels.*.name, 'needs-triage') }} | |
run: exit 1 | |
get-test-image-tag: | |
runs-on: ubuntu-latest | |
outputs: | |
tag: ${{ steps.compute-tag.outputs.tag }} | |
steps: | |
- name: Compute test image tag | |
id: compute-tag | |
run: | | |
prefix="ci" | |
if [ -n "${{ github.event.number }}" ]; then | |
prefix="pr-${{ github.event.number }}" | |
fi | |
echo "tag=${prefix}-$GITHUB_SHA" >> $GITHUB_OUTPUT | |
run-test-jobs: | |
uses: ./.github/workflows/test-ci-reusable.yml | |
needs: [get-test-image-tag] | |
permissions: | |
packages: write | |
statuses: write | |
with: | |
tag: ${{ needs.get-test-image-tag.outputs.tag }} | |
sha: ${{ needs.checkout-branch.outputs.PR_head_sha }} |