Skip to content

Commit

Permalink
ci: add a workflow to update the license information
Browse files Browse the repository at this point in the history
  • Loading branch information
wangl-cc committed Nov 22, 2024
1 parent d1ddb4a commit a99e222
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 4 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/chore-license.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Update Third-Party Licenses Information

on:
push:
branches: ["main"]
paths:
- "Cargo.lock"
- "about.toml"
- "about.hbs"

jobs:
update-license:
name: Update Third-Party Licenses Information
runs-on: ubuntu-latest
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: Setup Git User
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
- name: Commit Changes
run: |
git add licenses.html
git commit -m "chore(deps): update third-party licenses information"
- name: Push Changes
run: git push
4 changes: 2 additions & 2 deletions about.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@
<main class="container">
<div class="intro">
<h1>Third Party Licenses</h1>
<p>This page lists the licenses of the projects used in cargo-about.</p>
<p>This page lists the licenses of the projects used in maa-cli.</p>
</div>

<h2>Overview of licenses:</h2>
<ul class="licenses-overview">
{{#each overview}}
Expand Down
4 changes: 2 additions & 2 deletions licenses.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@
<main class="container">
<div class="intro">
<h1>Third Party Licenses</h1>
<p>This page lists the licenses of the projects used in cargo-about.</p>
<p>This page lists the licenses of the projects used in maa-cli.</p>
</div>

<h2>Overview of licenses:</h2>
<ul class="licenses-overview">
<li><a href="#Apache-2.0">Apache License 2.0</a> (30)</li>
Expand Down

0 comments on commit a99e222

Please sign in to comment.