ci: fix permissions to push #3
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: Update Third-Party Licenses Information | |
on: | |
push: | |
branches: ["main"] | |
paths: | |
- "Cargo.lock" | |
- "about.toml" | |
- "about.hbs" | |
- ".github/workflows/chore-license.yml" | |
jobs: | |
update-license: | |
name: Update Third-Party Licenses Information | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install cargo-about | |
uses: taiki-e/install-action@v2 | |
with: | |
tool: cargo-about | |
- name: Generate Third-Party Licenses Information | |
run: cargo about generate about.hbs > licenses.html | |
- name: Commit Changes if needed | |
run: | | |
git diff --exit-code && exit 0 | |
git add licenses.html | |
git config user.name "github-actions[bot]" | |
git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
git commit -m "chore(deps): update third-party licenses information" | |
git push |