-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Magdalena Kuhn
committed
Apr 4, 2024
1 parent
1ca5634
commit 16114c3
Showing
1 changed file
with
13 additions
and
6 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
name: Update Contributors List | ||
|
||
on: | ||
push: | ||
branches: | ||
- NOREF_adjust_structure | ||
workflow_dispatch: | ||
schedule: | ||
- cron: "0 22 * * *" | ||
|
||
jobs: | ||
update-contributors: | ||
|
@@ -21,11 +21,18 @@ jobs: | |
- name: Update README with contributors | ||
run: python src/fetch_contributors.py | ||
- name: Commit and push if changed | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "GitHub Action" | ||
PR_BRANCH="auto-pr-${GITHUB_SHA}" | ||
git checkout -b $PR_BRANCH | ||
git add README.md | ||
git commit -m "Update contributors list" || exit 0 | ||
git push | ||
git push origin $PR_BRANCH | ||
echo "PR_BRANCH=${PR_BRANCH}" >> $GITHUB_ENV | ||
- name: Create Pull Request | ||
id: create_pr | ||
env: | ||
GH_TOKEN: ${{ secrets.AUTOMATION_TOKEN }} | ||
run: | | ||
gh pr create --title "NOREF_update_list_of_contributors" --body "Fetch latest contributors" |