File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ inputs:
1818outputs :
1919 valid_commit :
2020 description : " Indicates if the commit hash is valid"
21+ value : ${{ steps.verify-commit.outputs.valid_commit }}
2122
2223runs :
2324 using : " composite"
@@ -30,15 +31,15 @@ runs:
3031 commit_id="${{ inputs.commit-hash }}"
3132
3233 if ! git rev-parse --quiet --verify "${commit_id}"; then
33- echo "::set-output name= valid_commit:: false"
34+ echo "valid_commit= false" >> $GITHUB_OUTPUT
3435 echo "Invalid commit hash: \`$commit_id\`"
3536 else
3637 # Verify if the commit is on the specified branch
3738 if ! git merge-base --is-ancestor "${commit_id}" "${branch_name}"; then
38- echo "::set-output name= valid_commit:: false"
39- echo "Commit \`$commit_id\` not found from branch \`$branch_name\`"
39+ echo "valid_commit= false" >> $GITHUB_OUTPUT
40+ echo "Commit \`$commit_id\` not found on the branch \`$branch_name\`"
4041 else
41- echo "::set-output name= valid_commit:: true"
42- echo "Commit \`$commit_id\` is valid from branch \`$branch_name\`"
42+ echo "valid_commit= true" >> $GITHUB_OUTPUT
43+ echo "Commit \`$commit_id\` is valid on the branch \`$branch_name\`"
4344 fi
4445 fi
You can’t perform that action at this time.
0 commit comments