From fca519264f46b1a6fd50ec0d8739123ab61bed90 Mon Sep 17 00:00:00 2001 From: Stefan Bossbaly Date: Sat, 20 Jul 2024 22:44:16 -0400 Subject: [PATCH 1/2] Added automated Cargo.toml upgrade CI (#7) Added the ability to automatically update the dependancies in the Cargo.toml file with the latest from crates.io. These upgrades are done weekly on Sunday at midnight. --- .github/workflows/update-dependancies.yml | 46 +++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 .github/workflows/update-dependancies.yml diff --git a/.github/workflows/update-dependancies.yml b/.github/workflows/update-dependancies.yml new file mode 100644 index 0000000..9d728b1 --- /dev/null +++ b/.github/workflows/update-dependancies.yml @@ -0,0 +1,46 @@ +on: + schedule: + - cron: "0 0 * * 0" + workflow_dispatch: + +name: Update Dependancies + +jobs: + update-dependancies: + runs-on: ubuntu-latest + steps: + - name: Timestamp Action + run: | + echo "NOW=$(date +'%Y-%m-%d-%I-%M-%S')" >> $GITHUB_OUTPUT + id: version + + - name: Checkout Source + uses: actions/checkout@v4 + + - name: Install Rust Toolchain + uses: dtolnay/rust-toolchain@stable + + - name: Install Cargo Edit + run: | + cargo install -f cargo-edit + + - name: Update Rust Dependencies + id: update-rust-dependencies + run: | + cargo update + echo 'CARGO_UPGRADE_OUTPUT<> $GITHUB_OUTPUT + cargo-upgrade upgrade --incompatible 2>&1 >> $GITHUB_OUTPUT + echo 'EOF' >> $GITHUB_OUTPUT + + - name: Create Pull Request + uses: peter-evans/create-pull-request@v6 + with: + add-paths: | + Cargo.toml + title: Update Dependancies + body: ${{ steps.update-rust-dependencies.outputs.CARGO_UPGRADE_OUTPUT }} + commit-message: ${{ steps.update-rust-dependencies.outputs.CARGO_UPGRADE_OUTPUT }} + assignees: StefanBossbaly + branch: update-dependancies-${{ steps.version.outputs.NOW }} + delete-branch: true + token: ${{ secrets.PAT_TOKEN }} From c5725e2c8c81abcb07c703accb9e06d3f6721bf3 Mon Sep 17 00:00:00 2001 From: StefanBossbaly <828855+StefanBossbaly@users.noreply.github.com> Date: Sun, 21 Jul 2024 14:09:38 +0000 Subject: [PATCH 2/2] name old req compatible latest new req ==== ======= ========== ====== ======= reqwest 0.12.4 0.12.5 0.12.5 0.12.5 serde_json 1.0.117 1.0.120 1.0.120 1.0.120 serde 1.0.203 1.0.204 1.0.204 1.0.204 thiserror 1.0.61 1.0.63 1.0.63 1.0.63 tokio 1.38.0 1.38.1 1.38.1 1.38.1 --- Cargo.toml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 38db1b8..68a20f4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -20,16 +20,16 @@ include = [ serde_debugging = ["dep:serde_path_to_error"] [dependencies] -reqwest = { version = "0.12.4", features = ["json"] } -serde_json = "1.0.117" -serde = { version = "1.0.203", features = ["derive"] } +reqwest = { version = "0.12.5", features = ["json"] } +serde_json = "1.0.120" +serde = { version = "1.0.204", features = ["derive"] } chrono = { version = "0.4", features = ["serde"] } -thiserror = "1.0.61" +thiserror = "1.0.63" serde_path_to_error = { version = "0.1.16", optional = true } [dev-dependencies] mockito = "1.4.0" -tokio = { version = "1.38.0", features = ["full"] } +tokio = { version = "1.38.1", features = ["full"] } anyhow = "1.0.86" [[example]]