ci: fix contributors workflow (again) (#3304)
This commit is contained in:
parent
2bdbe5d918
commit
869caf35ec
|
@ -14,6 +14,7 @@ env:
|
||||||
# Assign commit authorship to official Github Actions bot:
|
# Assign commit authorship to official Github Actions bot:
|
||||||
GIT_USER: github-actions[bot]
|
GIT_USER: github-actions[bot]
|
||||||
GIT_EMAIL: 41898282+github-actions[bot]@users.noreply.github.com
|
GIT_EMAIL: 41898282+github-actions[bot]@users.noreply.github.com
|
||||||
|
BRANCH_NAME: contributors-update
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
add-contributors:
|
add-contributors:
|
||||||
|
@ -23,6 +24,12 @@ jobs:
|
||||||
- name: 'Checkout'
|
- name: 'Checkout'
|
||||||
uses: actions/checkout@v3
|
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.
|
# 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
|
# 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
|
uses: BobAnkh/add-contributors@v0.2.2
|
||||||
with:
|
with:
|
||||||
ACCESS_TOKEN: ${{secrets.GITHUB_TOKEN}}
|
ACCESS_TOKEN: ${{secrets.GITHUB_TOKEN}}
|
||||||
|
BRANCH: ${{ env.BRANCH_NAME }}
|
||||||
COMMIT_MESSAGE: 'docs: update `CONTRIBUTORS.md`'
|
COMMIT_MESSAGE: 'docs: update `CONTRIBUTORS.md`'
|
||||||
PATH: /CONTRIBUTORS.md
|
PATH: /CONTRIBUTORS.md
|
||||||
CONTRIBUTOR: '## Contributors'
|
CONTRIBUTOR: '## Contributors'
|
||||||
|
@ -45,7 +53,8 @@ jobs:
|
||||||
id: create-pr
|
id: create-pr
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
branch: contributors-update
|
base: master
|
||||||
|
branch: ${{ env.BRANCH_NAME }}
|
||||||
title: 'docs: update `CONTRIBUTORS.md`'
|
title: 'docs: update `CONTRIBUTORS.md`'
|
||||||
commit-message: 'docs: update `CONTRIBUTORS.md`'
|
commit-message: 'docs: update `CONTRIBUTORS.md`'
|
||||||
delete-branch: true
|
delete-branch: true
|
||||||
|
@ -70,7 +79,7 @@ jobs:
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
# Skipped workflows are still assigned a "success" status:
|
# Skipped workflows are still assigned a "success" status:
|
||||||
status: success
|
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 }}
|
sha: ${{ steps.create-pr.outputs.pull-request-head-sha }}
|
||||||
# Name of status check to add/update:
|
# Name of status check to add/update:
|
||||||
context: lint
|
context: lint
|
||||||
|
|
Loading…
Reference in New Issue