forked from 1b-agent/fieldcraft-upstream
ci: check dependency licences with cargo-deny on every pull request
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01UhhZMBTviDQxZvwnyP89fo
This commit is contained in:
1 parent
e3d42d8be1
commit
e85300234f
4 files changed
+24
-14665
No files matched your search
@@ -60,12 +60,6 @@ jobs:
|
|||||||
- uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2
|
- uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2
|
||||||
with:
|
with:
|
||||||
save-if: ${{ github.ref == 'refs/heads/develop' }}
|
save-if: ${{ github.ref == 'refs/heads/develop' }}
|
||||||
# A dependency update changes THIRD-PARTY-LICENSES.txt, which Dependabot cannot regenerate:
|
|
||||||
# regenerate it here so the gate checks everything else, and dependabot-licences.yml commits
|
|
||||||
# it to the pull request.
|
|
||||||
- name: Regenerate THIRD-PARTY-LICENSES.txt (Dependabot)
|
|
||||||
if: github.event.pull_request.user.login == 'dependabot[bot]'
|
|
||||||
run: cargo xtask licences
|
|
||||||
- run: cargo xtask ci
|
- run: cargo xtask ci
|
||||||
|
|
||||||
heavy:
|
heavy:
|
||||||
@@ -120,7 +114,7 @@ jobs:
|
|||||||
run: git diff --exit-code docs/oracle.md
|
run: git diff --exit-code docs/oracle.md
|
||||||
|
|
||||||
advisories:
|
advisories:
|
||||||
name: Dependency advisories and sources
|
name: Dependency licences, advisories and sources
|
||||||
if: github.event.schedule != '41 4 * * 0' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository || github.event.pull_request.user.login == 'dependabot[bot]')
|
if: github.event.schedule != '41 4 * * 0' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository || github.event.pull_request.user.login == 'dependabot[bot]')
|
||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-24.04
|
||||||
timeout-minutes: 20
|
timeout-minutes: 20
|
||||||
@@ -129,4 +123,4 @@ jobs:
|
|||||||
- uses: dtolnay/rust-toolchain@stable
|
- uses: dtolnay/rust-toolchain@stable
|
||||||
- name: Install cargo-deny
|
- name: Install cargo-deny
|
||||||
run: cargo install cargo-deny --version 0.20.2 --locked
|
run: cargo install cargo-deny --version 0.20.2 --locked
|
||||||
- run: cargo deny --locked check --warn unmaintained advisories bans sources
|
- run: cargo deny --locked check --warn unmaintained advisories bans licenses sources
|
||||||
@@ -1,40 +0,0 @@
|
|||||||
# Dependabot's Cargo updates change THIRD-PARTY-LICENSES.txt (`cargo xtask licences`), which
|
|
||||||
# Dependabot cannot regenerate: this commits the regenerated file to its pull request. CI's own
|
|
||||||
# run on the pull request regenerates it too, so its result covers everything else.
|
|
||||||
name: Dependabot licences
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
branches: [develop]
|
|
||||||
paths: [Cargo.lock]
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
|
|
||||||
concurrency:
|
|
||||||
group: dependabot-licences-${{ github.head_ref }}
|
|
||||||
cancel-in-progress: true
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
licences:
|
|
||||||
if: github.event.pull_request.user.login == 'dependabot[bot]'
|
|
||||||
runs-on: ubuntu-24.04
|
|
||||||
timeout-minutes: 20
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
||||||
with:
|
|
||||||
ref: ${{ github.head_ref }}
|
|
||||||
- uses: dtolnay/rust-toolchain@stable
|
|
||||||
- run: cargo xtask licences
|
|
||||||
- name: Commit the regenerated file
|
|
||||||
run: |
|
|
||||||
if git diff --quiet -- THIRD-PARTY-LICENSES.txt; then
|
|
||||||
echo "THIRD-PARTY-LICENSES.txt is up to date"
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
git config user.name "github-actions[bot]"
|
|
||||||
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
|
||||||
# [skip ci]: the pull request's CI run already regenerated this file and tested the
|
|
||||||
# tree with it; a bot-authored commit would otherwise wait for a maintainer's approval.
|
|
||||||
git commit -m "deps: regenerate THIRD-PARTY-LICENSES.txt [skip ci]" -- THIRD-PARTY-LICENSES.txt
|
|
||||||
git push origin "HEAD:${GITHUB_HEAD_REF}"
|
|
||||||
File diff suppressed because it is too large.
Load diff
@@ -1,4 +1,3 @@
|
|||||||
# Licences are covered by `cargo xtask licences --check`.
|
|
||||||
[advisories]
|
[advisories]
|
||||||
unmaintained = "all"
|
unmaintained = "all"
|
||||||
yanked = "warn"
|
yanked = "warn"
|
||||||
@@ -15,3 +14,25 @@ allow-registry = ["https://github.com/rust-lang/crates.io-index"]
|
|||||||
# SolidCraft's kernel and its patched truck crates, pinned by rev in Cargo.toml.
|
# SolidCraft's kernel and its patched truck crates, pinned by rev in Cargo.toml.
|
||||||
# storytold/craft-libs: the Craft family's shared UI components (craft-ui), pinned by rev.
|
# storytold/craft-libs: the Craft family's shared UI components (craft-ui), pinned by rev.
|
||||||
allow-git = ["https://github.com/bherbruck/solidcraft", "https://github.com/storytold/craft-libs"]
|
allow-git = ["https://github.com/bherbruck/solidcraft", "https://github.com/storytold/craft-libs"]
|
||||||
|
|
||||||
|
# What FieldCraft may ship: permissive licences only (no copyleft). A crate offering
|
||||||
|
# a choice (MIT OR LGPL) passes on its permissive option. THIRD-PARTY-LICENSES.txt is generated at
|
||||||
|
# release time (`cargo xtask licences`); this is the policy every pull request is held to.
|
||||||
|
[licenses]
|
||||||
|
confidence-threshold = 0.9
|
||||||
|
allow = [
|
||||||
|
"0BSD",
|
||||||
|
"Apache-2.0",
|
||||||
|
"Apache-2.0 WITH LLVM-exception",
|
||||||
|
"BSD-2-Clause",
|
||||||
|
"BSD-3-Clause",
|
||||||
|
"BSL-1.0",
|
||||||
|
"CDLA-Permissive-2.0",
|
||||||
|
"ISC",
|
||||||
|
"MIT",
|
||||||
|
"OFL-1.1",
|
||||||
|
"Ubuntu-font-1.0",
|
||||||
|
"Unicode-3.0",
|
||||||
|
"Unlicense",
|
||||||
|
"Zlib",
|
||||||
|
]
|
||||||
Reference in new issue
Block a user