From e4f001eacba503b9022e3b4a37805602f3c0414a Mon Sep 17 00:00:00 2001 From: Andrej Orsula Date: Sat, 9 Mar 2024 13:07:21 +0100 Subject: [PATCH 1/2] Update Dependabot automation Signed-off-by: Andrej Orsula --- .github/workflows/dependabot.yml | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/.github/workflows/dependabot.yml b/.github/workflows/dependabot.yml index 544bfee..b8349c1 100644 --- a/.github/workflows/dependabot.yml +++ b/.github/workflows/dependabot.yml @@ -1,15 +1,12 @@ name: Dependabot automation -on: - pull_request: - check_run: - types: [completed] +on: pull_request permissions: contents: write pull-requests: write jobs: - approve: + dependabot_automation: runs-on: ubuntu-latest if: ${{ github.actor == 'dependabot[bot]' && github.event_name == 'pull_request' }} steps: @@ -18,23 +15,12 @@ jobs: uses: dependabot/fetch-metadata@v1 with: github-token: "${{ secrets.GITHUB_TOKEN }}" - - name: Approve PR + - name: Approve the PR env: PR_URL: ${{github.event.pull_request.html_url}} GH_TOKEN: ${{secrets.GITHUB_TOKEN}} run: gh pr review --approve "$PR_URL" - - auto_merge: - runs-on: ubuntu-latest - if: ${{ github.actor == 'dependabot[bot]' && github.event_name == 'check_run' }} - steps: - - name: Fetch metadata - id: metadata - uses: dependabot/fetch-metadata@v1 - with: - github-token: "${{ secrets.GITHUB_TOKEN }}" - - name: Enable PR auto-merge - if: steps.metadata.outputs.update-type == 'version-update:semver-patch' + - name: Enable auto-merge for the PR env: PR_URL: ${{github.event.pull_request.html_url}} GH_TOKEN: ${{secrets.GITHUB_TOKEN}} From 5e5b3995a886df56343ceab548eebfad807ca193 Mon Sep 17 00:00:00 2001 From: Andrej Orsula Date: Sat, 9 Mar 2024 15:09:29 +0100 Subject: [PATCH 2/2] Update Rust CI to maintain name for `cargo (MSRV)` job Signed-off-by: Andrej Orsula --- .github/workflows/rust.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index bf4eaa6..9226e1e 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -14,6 +14,7 @@ concurrency: cancel-in-progress: true env: + MSRV: "1.74" PYTHON_VERSION: "3.10" CARGO_TERM_COLOR: always LIB_PACKAGE_NAME: pyo3_bindgen @@ -41,7 +42,7 @@ jobs: fail-fast: false matrix: toolchain: - - "1.74" # Minimal supported Rust version (MSRV) + - MSRV - stable - beta steps: @@ -50,9 +51,19 @@ jobs: with: save-if: ${{ github.event_name == 'push'}} - uses: dtolnay/rust-toolchain@master + if: ${{ matrix.toolchain != 'MSRV' && matrix.toolchain != 'stable' }} + with: + toolchain: ${{ matrix.toolchain }} + - uses: dtolnay/rust-toolchain@master + if: ${{ matrix.toolchain == 'MSRV' }} + with: + toolchain: ${{ env.MSRV }} + - uses: dtolnay/rust-toolchain@master + if: ${{ matrix.toolchain == 'stable' }} with: toolchain: ${{ matrix.toolchain }} components: clippy + - uses: actions/setup-python@v5 with: python-version: ${{ env.PYTHON_VERSION }}