Update actions-artifacts.sh #3774
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
name: "AUTHORS" | |
on: | |
push: | |
branches: [ master ] | |
permissions: write-all | |
jobs: | |
authors: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/[email protected] | |
with: | |
fetch-depth: 0 | |
- name: AUTHORS | |
shell: bash | |
run: | | |
bash --noprofile --norc -e -o pipefail docs/tools/git-config.sh | |
git fetch origin +refs/tags/artifacts:refs/tags/artifacts --no-tags | |
git fetch origin +refs/tags/latest:refs/tags/latest --no-tags | |
git log --format='%aN <%aE>%n%cN <%cE>' --all | sort -u > AUTHORS.txt | |
sort -muo .mailmap -- .mailmap AUTHORS.txt | |
- id: cpr | |
uses: peter-evans/[email protected] | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
commit-message: Update AUTHORS | |
author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> | |
committer: GitHub <[email protected]> | |
title: Credit new contributors | |
body: | | |
Credit our new contributors :tada: | |
labels: automerge | |
branch: actions/authors | |
base: master | |
- name: get repository name | |
if: ${{ steps.cpr.outputs.pull-request-number }} | |
shell: bash | |
run: echo "REPOSITORY_NAME=${GITHUB_REPOSITORY#*/}" >> $GITHUB_ENV | |
- name: automerge | |
if: ${{ steps.cpr.outputs.pull-request-number }} | |
uses: actions/[email protected] | |
with: | |
script: | | |
github.rest.pulls.merge({ | |
owner: '${{ github.repository_owner }}', | |
repo: '${{ env.REPOSITORY_NAME }}', | |
pull_number: '${{ steps.cpr.outputs.pull-request-number }}', | |
sha: '${{ steps.cpr.outputs.pull-request-head-sha }}', | |
merge_method: 'merge' | |
}) |