File tree Expand file tree Collapse file tree 2 files changed +19
-3
lines changed Expand file tree Collapse file tree 2 files changed +19
-3
lines changed Original file line number Diff line number Diff line change @@ -52,14 +52,16 @@ jobs:
5252 runs-on : ubuntu-latest
5353 outputs :
5454 UPLOAD_VERSION : ${{ steps.meta.outputs.upload_version }}
55+ COMMIT_SHA : ${{ steps.meta.outputs.sha }}
5556 steps :
56- - name : Derive image version (pr-123-HASH)
57+ - name : Derive image version
5758 id : meta
5859 run : |
5960 PR_NUMBER=${{ github.event.pull_request.number }}
60- COMMIT_HASH=${{ github.event.pull_request.head.sha }}
61- UPLOAD_VERSION="pr-${PR_NUMBER}-${COMMIT_HASH}"
61+ UPLOAD_VERSION="pr-${PR_NUMBER}"
6262 echo "upload_version=${UPLOAD_VERSION}" >> $GITHUB_OUTPUT
63+ SHA="${ GITHUB_SHA::8 }"
64+ echo "sha=${SHA}" >> $GITHUB_OUTPUT
6365
6466 upload :
6567 name : Upload PR image to OCI
7274 flavor_filter : ' --include-only "metal-sci_usi-amd64"'
7375 additional_semver_tag : false
7476 secrets : inherit
77+
78+ test :
79+ name : Test PR image
80+ needs : [meta, upload]
81+ if : ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository && github.event.action != 'closed' }}
82+ uses : ./.github/workflows/test.yml
83+ with :
84+ image_tag : " pr-${{ github.event.pull_request.number }}-metal-sci_usi-amd64-${{ needs.set_version.outputs.VERSION }}-${{ needs.meta.outputs.COMMIT_SHA }}-amd64"
Original file line number Diff line number Diff line change 1414 description : " Image tag to test (must be usi-sci)"
1515 type : string
1616 default : " "
17+ workflow_call :
18+ inputs :
19+ image_tag :
20+ description : " Image tag to test (must be usi-sci)"
21+ type : string
22+ required : true
1723
1824jobs :
1925 test :
You can’t perform that action at this time.
0 commit comments