ci: fix contributors workflow (again) (#3304)

This commit is contained in:
georglauterbach 2023-05-02 20:52:54 +02:00
parent 2bdbe5d918
commit 869caf35ec
No known key found for this signature in database
GPG Key ID: F367F7C43C118578
1 changed files with 11 additions and 2 deletions

View File

@ -14,6 +14,7 @@ env:
# Assign commit authorship to official Github Actions bot:
GIT_USER: github-actions[bot]
GIT_EMAIL: 41898282+github-actions[bot]@users.noreply.github.com
BRANCH_NAME: contributors-update
jobs:
add-contributors:
@ -23,6 +24,12 @@ jobs:
- name: 'Checkout'
uses: actions/checkout@v3
- name: 'Checkout New Branch and Push It'
run: |
git checkout -b ${{ env.BRANCH_NAME }}
git push --force https://${GITHUB_ACTOR}:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git HEAD:${{ env.BRANCH_NAME }}
git checkout master
# See https://github.com/marketplace/actions/auto-add-contributors for reference of the action.
#
# This action is not well documented, but it does the job for now. We pin the version in order
@ -31,6 +38,7 @@ jobs:
uses: BobAnkh/add-contributors@v0.2.2
with:
ACCESS_TOKEN: ${{secrets.GITHUB_TOKEN}}
BRANCH: ${{ env.BRANCH_NAME }}
COMMIT_MESSAGE: 'docs: update `CONTRIBUTORS.md`'
PATH: /CONTRIBUTORS.md
CONTRIBUTOR: '## Contributors'
@ -45,7 +53,8 @@ jobs:
id: create-pr
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: contributors-update
base: master
branch: ${{ env.BRANCH_NAME }}
title: 'docs: update `CONTRIBUTORS.md`'
commit-message: 'docs: update `CONTRIBUTORS.md`'
delete-branch: true
@ -70,7 +79,7 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}
# Skipped workflows are still assigned a "success" status:
status: success
# This should be the correct commit SHA on the contributors-update branch:
# This should be the correct commit SHA on ${{ env.BRANCH_NAME }}:
sha: ${{ steps.create-pr.outputs.pull-request-head-sha }}
# Name of status check to add/update:
context: lint