diff --git a/.github/workflows/license_update.yml b/.github/workflows/license_update.yml new file mode 100644 index 000000000..fb201d502 --- /dev/null +++ b/.github/workflows/license_update.yml @@ -0,0 +1,54 @@ +name: Update THIRD_PARTY_LICENSES_RUST_CRATES.html +on: + schedule: + # Run the job every midnight. + - cron: '0 0 * * *' + workflow_dispatch: + +permissions: + contents: read + +jobs: + update_license: + name: Update THIRD_PARTY_LICENSES_RUST_CRATES.html + permissions: + contents: write + pull-requests: write + runs-on: ubuntu-latest + steps: + # Clone the repository and check if THIRD_PARTY_LICENSES_RUST_CRATES.html + # is up-to-date. + - uses: actions/checkout@v3.5.0 + with: + persist-credentials: false + - run: cargo install --locked --version "~0.5" cargo-about + - run: cargo about generate --workspace --output-file THIRD_PARTY_LICENSES_RUST_CRATES.html about.hbs + - id: checkgitdiff # Early exit if there is no diff. + run: | + git diff --exit-code --quiet + [ $? -eq 0 ] && { + echo "THIRD_PARTY_LICENSES_RUST_CRATES.html is up-to-date." + gh run cancel ${{ github.run_id }} + gh run watch ${{ github.run_id }} + } + continue-on-error: true + # Delete existing rust-crates-license-update branch. + - uses: dawidd6/action-delete-branch@v3 + with: + github_token: ${{github.token}} + branches: rust-crates-license-update + # Create a new PR. + - uses: gr2m/create-or-update-pull-request-action@v1.x + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + # https://github.com/actions/checkout/pull/1184 + author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> + branch: rust-crates-license-update + title: 'doc: update THIRD_PARTY_LICENSES_RUST_CRATES.html' + body: > + THIRD_PARTY_LICENSES_RUST_CRATES.html needs an update. This is an automatically generated PR by + a GitHub Action. + commit-message: 'doc: update THIRD_PARTY_LICENSES_RUST_CRATES.html' + + diff --git a/Cargo.lock b/Cargo.lock index ca7a94a44..2630504b5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1142,9 +1142,9 @@ checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" [[package]] name = "openssl" -version = "0.10.51" +version = "0.10.55" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97ea2d98598bf9ada7ea6ee8a30fb74f9156b63bbe495d64ec2b87c269d2dda3" +checksum = "345df152bc43501c5eb9e4654ff05f794effb78d4efe3d53abc158baddc0703d" dependencies = [ "bitflags", "cfg-if", @@ -1168,9 +1168,9 @@ dependencies = [ [[package]] name = "openssl-sys" -version = "0.9.86" +version = "0.9.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "992bac49bdbab4423199c654a5515bd2a6c6a23bf03f2dd3bdb7e5ae6259bc69" +checksum = "db4d56a4c0478783083cfafcc42493dd4a981d41669da64b4572a2a089b51b1d" dependencies = [ "cc", "libc", @@ -1311,9 +1311,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.56" +version = "1.0.67" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b63bdb0cd06f1f4dedf69b254734f9b45af66e4a031e42a7480257d9898b435" +checksum = "3d433d9f1a3e8c1263d9456598b16fec66f4acc9a74dacffd35c7bb09b3a1328" dependencies = [ "unicode-ident", ]