Skip to content

Update Contributors

Update Contributors #1

name: Update Contributors
on:
workflow_dispatch:
inputs:
logLevel:
description: 'Log level'
required: true
default: 'warning'
type: choice
options:
- info
- warning
- debug
jobs:
update-contributors:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Update Contributors
run: |
CONTRIBUTORS=$(curl -s https://api.github.com/repos/zakarialabib/mystockmaster/contributors | jq -r '.[].login')
sed -i '/## Contributors/q' README.md
echo -e "## Contributors\n\n$(printf -- '- [%s](https://github.com/%s)\n' $CONTRIBUTORS)" >> README.md
git config --global user.email "[email protected]"
git config --global user.name "GitHub Actions"
git add README.md
git commit -m "Update Contributors [skip ci]"
git push