File tree Expand file tree Collapse file tree 1 file changed +17
-2
lines changed
Expand file tree Collapse file tree 1 file changed +17
-2
lines changed Original file line number Diff line number Diff line change 1111 - ' *-maintenance'
1212
1313jobs :
14- # Job 1: Build the code (no secrets here)
14+ commit_reference :
15+ name : Get Commit Reference
16+ runs-on : ubuntu-latest
17+ outputs :
18+ commit_ref : ${{ steps.set_commit_ref.outputs.commit_ref }}
19+ steps :
20+ - name : Set Commit Reference
21+ id : set_commit_ref
22+ run : |
23+ if [[ "${{ github.event_name }}" == "push" ]]; then
24+ echo "commit_ref=${{ github.sha }}" >> $GITHUB_OUTPUT
25+ else
26+ echo "commit_ref=${{ github.event.pull_request.head.sha }}" >> $GITHUB_OUTPUT
27+
28+ # Build the code (minimal secrets here)
1529 build :
1630 name : Build
31+ needs : commit_reference
1732 uses : ./.github/workflows/build.yml
1833 with :
1934 debug_build : ${{ github.event_name == 'pull_request_target' || github.event_name == 'pull_request' }}
20- commit_ref : ${{ github.event_name == 'pull_request_target' || github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
35+ commit_ref : ${{ needs.commit_reference.outputs.commit_ref }}
2136 secrets :
2237 RELEASE_KEYSTORE : ${{ secrets.RELEASE_KEYSTORE }}
2338 RELEASE_KEYSTORE_PASSWORD : ${{ secrets.RELEASE_KEYSTORE_PASSWORD }}
You can’t perform that action at this time.
0 commit comments