Skip to content

Commit

Permalink
Fix username
Browse files Browse the repository at this point in the history
  • Loading branch information
hetulvp committed Apr 21, 2024
1 parent b0411d7 commit 909110e
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions .github/workflows/update_leaderboard_after_merge.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,23 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

- name: Get merged commit hash
id: merged_commit
- name: Get merge commit hash
id: merge_commit
run: |
merged_commit=$(git show --format=%H -s $GITHUB_SHA)
echo "Merged commit $GITHUB_SHA"
echo "::set-output name=merged_commit::$merged_commit"
merge_commit=$(git log --merges --pretty=format:%H -1 $GITHUB_SHA)
echo $merge_commit
echo "::set-output name=merge_commit::$merge_commit"
- name: Get author's name from merged commit
id: author_name
- name: Get second-to-last author's name
id: second_last_author_name
run: |
author_name=$(git show -s --format='%ae' ${{ steps.merged_commit.outputs.merged_commit }})
echo "::set-output name=author_name::$author_name"
echo "$(git log --format='%ae' -n 2 ${{ steps.merge_commit.outputs.merge_commit }})"
second_last_author_name=$(git log --format='%ae' -n 2 ${{ steps.merge_commit.outputs.merge_commit }} | tail -n 1)
echo $second_last_author_name
echo "::set-output name=second_last_author_name::$second_last_author_name"
- name: Print author's name
run: echo "${{ steps.author_name.outputs.author_name }}"
run: echo "${{ steps.author_name.outputs.second_last_author_name }}"


- name: Check if there are any changes in submissions dir
Expand Down

0 comments on commit 909110e

Please sign in to comment.