-
Notifications
You must be signed in to change notification settings - Fork 10
58 lines (52 loc) · 1.91 KB
/
license-report.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# ********************************************************************************
# Copyright (c) 2024 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
#
# This program and the accompanying materials are made available under the
# terms of the Apache License Version 2.0 which is available at
# https://www.apache.org/licenses/LICENSE-2.0
#
# SPDX-License-Identifier: Apache-2.0
# *******************************************************************************/
# Use cargo-about to create a comprehensive report on licenses used by crate and all dependencies
# Upload license report for potential re-use in publication workflow, returns the corresponding download URL as an output on workflow_call
# Note: this feature builds on the license statements as declared by their authors
name: License report
on:
workflow_call:
outputs:
license_report_url:
description: "URL of the license report artifact"
value: ${{ jobs.license_check.outputs.license_report_url }}
workflow_dispatch:
env:
RUST_TOOLCHAIN: ${{ vars.RUST_TOOLCHAIN || 'stable' }}
RUSTFLAGS: -Dwarnings
CARGO_TERM_COLOR: always
jobs:
license_check:
name: create
runs-on: ubuntu-latest
outputs:
license_report_url: ${{ steps.license_report.outputs.artifact-url }}
steps:
- uses: actions/checkout@v4
with:
submodules: "recursive"
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.RUST_TOOLCHAIN }}
- uses: Swatinem/rust-cache@v2
- name: Install cargo-about
run: |
cargo install cargo-about
- name: Create license report
run: |
cargo about generate about.hbs > licenses.html
- uses: actions/upload-artifact@v4
id: license_report
with:
name: license-report
path: licenses.html