Skip to content

Commit

Permalink
updated update_credits.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
qcdyx committed Nov 19, 2023
1 parent d920219 commit 67c71ff
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/update_credits.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
name: Update Credits upon opening PR
name: Update Credits upon merging PR

on:
pull_request:
branches:
- master
types:
- opened
- synchronize
- closed

jobs:
update-credits:
runs-on: ubuntu-latest
if: github.event.pull_request.merged == true
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}
ref: master
- run: |
contributor_name=$(jq -r '.pull_request.user.login' $GITHUB_EVENT_PATH)
pr_description=$(jq -r '.pull_request.body' $GITHUB_EVENT_PATH)
Expand All @@ -31,6 +31,6 @@ jobs:
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git commit -m "Update credits.md with contributor information"
git push origin ${{ github.event.pull_request.head.ref }}
git push origin master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 67c71ff

Please sign in to comment.