Skip to content

another attempt

another attempt #76

Workflow file for this run

name: Update license file
on:
push:
branches:
- 'dependabot/**'
- 'snyk-upgrade-*'
# Workflows triggered by Dependabot have a read-only token by default.
# Need to grant write permissions so this workflow can commit changes to the license file.
permissions:
contents: write
jobs:
update_license_file:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: npm ci
- name: Install git-secrets
run: npm run install-git-secrets
- name: Update license file
run: npm run license
- name: Push changes if license file changed
run: |
if [ -n "$(git status --porcelain | grep "THIRD-PARTY-LICENSES.csv")" ]; then
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add THIRD-PARTY-LICENSES.csv
git commit -m "Update license file"
git push
else
echo "There were no changes to THIRD-PARTY-LICENSE.csv"
fi