Skip to content

update-contributors #27

update-contributors

update-contributors #27

name: update-contributors
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * 0'
permissions:
contents: write
pull-requests: write
jobs:
update-contributors:
name: validate-pull-request-title
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
- name: update-contributors
uses: kontrolplane/generate-contributors-list@v1.1.0
with:
owner: kontrolplane
repository: pull-request-title-validator
- name: check-for-changes
id: check
run: |
if git diff --quiet README.md; then
echo "No changes to commit"
echo "changes=false" >> $GITHUB_OUTPUT
exit 0
fi
echo "changes=true" >> $GITHUB_OUTPUT
- name: open-pull-request
if: steps.check.outputs.changes == 'true'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config user.name github-actions
git config user.email github-actions@github.com
git checkout -b update-contributors
git add README.md
git commit -m "chore: update contributors section"
git push -u origin update-contributors
gh pr create \
--title "chore: update contributors" \
--body "Automatically update contributors section." \
--base main \
--head update-contributors