File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 99 checkout-token :
1010 description : ' Checkout token with repo permissions'
1111 required : false
12+ outputs :
13+ version :
14+ description : ' Detected or calculated version'
15+ value : ${{ jobs.promote.outputs.version }}
16+ commit-sha :
17+ description : ' The commit SHA being built'
18+ value : ${{ jobs.promote.outputs.version }}
1219 inputs :
1320 git-user-name :
1421 description : ' The git user name'
@@ -120,6 +127,9 @@ jobs:
120127 promote :
121128 name : Promote
122129 runs-on : ubuntu-24.04
130+ outputs :
131+ version : ${{ steps.release_version.outputs.version }}
132+ commit-sha : ${{ steps.determine_sha.outputs.sha }}
123133 steps :
124134 - name : checkout repository
125135 uses : actions/checkout@v6
@@ -129,6 +139,19 @@ jobs:
129139 submodules : ${{ inputs.submodules }}
130140 token : ${{ secrets.checkout-token || secrets.GITHUB_TOKEN }}
131141
142+ - name : Determine commit SHA
143+ id : determine_sha
144+ shell : bash
145+ run : |
146+ if [ -n "${{ github.event.pull_request.head.sha }}" ]; then
147+ SHA="${{ github.event.pull_request.head.sha }}"
148+ echo "Using PR HEAD SHA: ${SHA}"
149+ else
150+ SHA=$(git rev-parse HEAD)
151+ echo "Using current HEAD SHA: ${SHA}"
152+ fi
153+ echo "sha=${SHA}" >> "$GITHUB_OUTPUT"
154+
132155 - id : release_version
133156 name : next release version
134157 uses : getdevopspro/github-actions/release-version@v6.5.1
You can’t perform that action at this time.
0 commit comments