-
Notifications
You must be signed in to change notification settings - Fork 20
45 lines (40 loc) · 1.07 KB
/
test-ci-push.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
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 }}