File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change 4848 name : Update changelog
4949 runs-on : ubuntu-latest
5050 outputs :
51- changelog_commitish : ${{ steps.get_sha.outputs.commit_sha || steps. commit.outputs.commit_long_sha || github.sha }}
51+ changelog_commitish : ${{ steps.commit.outputs.commit_long_sha || github.sha }}
5252
5353 steps :
5454 - name : Checkout repository
9191
9292 - name : Get commit SHA
9393 id : get_sha
94- if : steps.commit.outputs.commit_long_sha != ''
9594 run : echo "commit_sha=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
9695
9796 create_github_release :
@@ -101,9 +100,17 @@ jobs:
101100 env :
102101 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
103102 steps :
103+ - name : Validate commit SHA
104+ run : |
105+ COMMIT_SHA="${{ needs.update_changelog.changelog_commitish }}"
106+ if [ -z "$COMMIT_SHA" ]; then
107+ echo "ERROR: changelog_commitish is empty!"
108+ exit 1
109+ fi
110+ echo "Using commit SHA: $COMMIT_SHA"
104111 - uses : actions/checkout@v4
105112 with :
106- ref : ${{ needs.update_changelog.changelog_commitish }}
113+ ref : ${{ needs.update_changelog.changelog_commitish || github.sha }}
107114 - name : Log current commit SHA
108115 run : |
109116 CURRENT_SHA=$(git rev-parse HEAD)
You can’t perform that action at this time.
0 commit comments