Merge branch 'master' of https://github.com/ShingareOm/SwapTwoNumbers… #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Update Contributors | |
on: | |
push: | |
branches: | |
- master | |
- main | |
jobs: | |
update-readme: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Update README.md | |
run: | | |
contributors=$(git shortlog -s -n | awk '{print "- ["$2"](https://github.com/"$2")"}') | |
echo -e "\n\nContributors:\n$contributors" >> README.md | |
git config --global user.email "actions@github.com" | |
git config --global user.name "GitHub Actions" | |
git commit -am "Update contributors" --no-gpg-sign | |
git push |