Skip to content

merge(#4): chore: add missing permissions to write #4

merge(#4): chore: add missing permissions to write

merge(#4): chore: add missing permissions to write #4

Workflow file for this run

name: Update AUTHORS.md on merge
on:
push:
branches:
- main
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: yarn install
- name: Run authors
run: yarn authors
- name: Check if AUTHORS.md has changed
run: |
if git status --porcelain | grep 'AUTHORS.md'; then
echo "CHANGED=true" >> $GITHUB_ENV
else
echo "CHANGED=false" >> $GITHUB_ENV
fi
echo "CHANGED is $CHANGED"
- name: Commit changes
if: ${{ env.CHANGED == 'true' }}
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add AUTHORS.md
git commit -m "docs: update AUTHORS.md"
git push