bindgen-cli: alternate use of bindgen - v1 #4165
Workflow file for this run
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: New Authors Check | |
on: | |
pull_request: | |
permissions: read-all | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
check-id: | |
name: New Author Check | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout PR code | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
fetch-depth: 0 | |
- run: sudo apt -y install git | |
- name: Export known authors from master branch | |
run: git log --format="%an <%ae>" origin/master | sort | uniq > authors.txt | |
- name: Export authors from new commits | |
run: git log --format="%an <%ae>" ${{ github.event.pull_request.base.sha }}... | sort | uniq > commit-authors.txt | |
- name: Check new authors | |
run: | | |
touch new-authors.txt | |
while read -r author; do | |
echo "Checking author: ${author}" | |
if ! grep -qFx "${author}" authors.txt; then | |
echo "ERROR: ${author} NOT FOUND" | |
echo "::warning ::New author found: ${author}" | |
echo "${author}" >> new-authors.txt | |
echo has_new_authors="yes" >> $GITHUB_ENV | |
fi | |
done < commit-authors.txt | |
- run: mkdir new-authors | |
- run: cp new-authors.txt new-authors | |
- run: echo ${{ github.event.number }} > new-authors/pr-number.txt | |
- run: ls -l | |
- name: Upload new authors | |
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 | |
with: | |
name: new-authors | |
path: new-authors | |