Skip to content

Commit

Permalink
Fix format of the author
Browse files Browse the repository at this point in the history
  • Loading branch information
tirumerla committed Dec 10, 2023
1 parent 81b8945 commit 627c313
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/rc-publish-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,8 @@ jobs:
run: |
COMMIT_SHA="$(git rev-parse HEAD)"
COMMIT_DETAILS=$(curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
"https://api.github.com/repos/${{ github.repository }}/commits/$COMMIT_SHA")
AUTHOR=$(git show -s --format='%an' $COMMIT_SHA)
MESSAGE=$(echo $COMMIT_DETAILS | yq '.commit.message')
MESSAGE=$(git show -s --format='%s' $COMMIT_SHA)
echo "author=$AUTHOR" >> $GITHUB_OUTPUT
echo "message=$MESSAGE" >> $GITHUB_OUTPUT
echo "Author of the commit is $AUTHOR"
Expand All @@ -50,7 +48,7 @@ jobs:
prepare:
needs: check_author
runs-on: ubuntu-22.04
if: ${{ needs.check_author.outputs.latest_commit_author == 'svc-gh-is-01' && contains(needs.check_author.outputs.commit_message, 'rc') }}
if: ${{ needs.check_author.outputs.latest_commit_author == 'github-actions[bot]' && contains(needs.check_author.outputs.commit_message, 'rc') }}
steps:
- name: Harden Runner
uses: step-security/harden-runner@8ca2b8b2ece13480cda6dacd3511b49857a23c09 # v2.5.1
Expand Down

0 comments on commit 627c313

Please sign in to comment.