From a1fd3720e829954af56addc799c8b737fd818f47 Mon Sep 17 00:00:00 2001 From: Costin Lupu Date: Thu, 23 Nov 2023 18:00:29 +0100 Subject: [PATCH] Partially revert "ci: remove license check jobs from the workflow file." MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This partially reverts commit 39db2953db21b0239de681c5a11f689da503a67d, i.e. revertes the 'license' directive. Without this change, the "Check dependencies for licenses" check remains in state "Expected — Waiting for status to be reported". Signed-off-by: Costin Lupu --- .github/workflows/ci.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 857d0bdd..ab527c04 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -50,3 +50,22 @@ jobs: - run: cargo install --locked --version "~0.17" cargo-audit - run: cargo audit --ignore RUSTSEC-2020-0159 --ignore RUSTSEC-2020-0071 + license: + name: Check dependencies for licenses + runs-on: ubuntu-latest + outputs: + license_changed: ${{ steps.license_diff.outputs.license_changed }} + steps: + - uses: actions/checkout@v3 + - uses: dtolnay/rust-toolchain@stable + - uses: Swatinem/rust-cache@v2 + - run: cargo install --locked --version "~0.5" cargo-about + - run: cargo about generate --workspace --output-file "${{ runner.temp }}/licenses.html" about.hbs + - id: license_diff + run: | + if diff -q THIRD_PARTY_LICENSES_RUST_CRATES.html ${{ runner.temp }}/licenses.html ; then + echo "license_changed=NO" >> $GITHUB_OUTPUT + else + echo "license_changed=YES" >> $GITHUB_OUTPUT + fi +