From d4490f7035092f96e6c31a52ba5906e1e0631122 Mon Sep 17 00:00:00 2001 From: Vasilis Date: Sat, 9 Dec 2023 03:15:38 +0100 Subject: [PATCH] Fixed credits action failing (#21733) --- .github/workflows/update-credits.yml | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/.github/workflows/update-credits.yml b/.github/workflows/update-credits.yml index 09844f4c19..e35d4def7d 100644 --- a/.github/workflows/update-credits.yml +++ b/.github/workflows/update-credits.yml @@ -24,9 +24,29 @@ jobs: # TODO #- name: Get this week's Patreons # run: Tools/script2dumppatreons > Resources/Credits/Patrons.yml + + # MAKE SURE YOU ENABLED "Allow GitHub Actions to create and approve pull requests" IN YOUR ACTIONS, OTHERWISE IT WILL MOST LIKELY FAIL + + + # For this you can use a pat token of an account with direct push access to the repo if you have protected branches. + # Uncomment this and comment the other line if you do this. + # https://github.com/stefanzweifel/git-auto-commit-action#push-to-protected-branches + + #- name: Commit new credit files + # uses: stefanzweifel/git-auto-commit-action@v4 + # with: + # commit_message: Update Credits + # commit_author: PJBot + + # This will make a PR + - name: Set current date as env variable + run: echo "NOW=$(date +'%Y-%m-%dT%H-%M-%S')" >> $GITHUB_ENV - - name: Commit new credit files - uses: stefanzweifel/git-auto-commit-action@v4 + - name: Create Pull Request + uses: peter-evans/create-pull-request@v5 with: - commit_message: Update Credits - commit_author: PJBot + commit-message: Update Credits + title: Update Credits + body: This is an automated Pull Request. This PR updates the github contributors in the credits section. + author: PJBot + branch: automated/credits-${{env.NOW}} -- 2.51.2