mirror of
https://github.com/astral-sh/ruff
synced 2026-01-21 13:30:49 -05:00
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [Swatinem/rust-cache](https://redirect.github.com/Swatinem/rust-cache) | action | minor | `v2` -> `v2.7.8` | --- > [!WARNING] > Some dependencies could not be looked up. Check the Dependency Dashboard for more information. --- ### Release Notes <details> <summary>Swatinem/rust-cache (Swatinem/rust-cache)</summary> ### [`v2.7.8`](https://redirect.github.com/Swatinem/rust-cache/releases/tag/v2.7.8) [Compare Source](https://redirect.github.com/Swatinem/rust-cache/compare/v2.7.7...v2.7.8) ##### What's Changed - Include CPU arch in the cache key for arm64 Linux runners by [@​rhysd](https://redirect.github.com/rhysd) in [https://github.com/Swatinem/rust-cache/pull/228](https://redirect.github.com/Swatinem/rust-cache/pull/228) **Full Changelog**: https://github.com/Swatinem/rust-cache/compare/v2.7.7...v2.7.8 ### [`v2.7.7`](https://redirect.github.com/Swatinem/rust-cache/releases/tag/v2.7.7) [Compare Source](https://redirect.github.com/Swatinem/rust-cache/compare/v2.7.6...v2.7.7) **Full Changelog**: https://github.com/Swatinem/rust-cache/compare/v2.7.6...v2.7.7 ### [`v2.7.6`](https://redirect.github.com/Swatinem/rust-cache/releases/tag/v2.7.6) [Compare Source](https://redirect.github.com/Swatinem/rust-cache/compare/v2.7.5...v2.7.6) ##### What's Changed - Updated artifact upload action to v4 by [@​guylamar2006](https://redirect.github.com/guylamar2006) in [https://github.com/Swatinem/rust-cache/pull/212](https://redirect.github.com/Swatinem/rust-cache/pull/212) - Adds an option to do lookup-only of the cache by [@​danlec](https://redirect.github.com/danlec) in [https://github.com/Swatinem/rust-cache/pull/217](https://redirect.github.com/Swatinem/rust-cache/pull/217) - add runner OS in cache key by [@​rnbguy](https://redirect.github.com/rnbguy) in [https://github.com/Swatinem/rust-cache/pull/220](https://redirect.github.com/Swatinem/rust-cache/pull/220) - Allow opting out of caching $CARGO_HOME/bin. by [@​benjyw](https://redirect.github.com/benjyw) in [https://github.com/Swatinem/rust-cache/pull/216](https://redirect.github.com/Swatinem/rust-cache/pull/216) ##### New Contributors - [@​guylamar2006](https://redirect.github.com/guylamar2006) made their first contribution in [https://github.com/Swatinem/rust-cache/pull/212](https://redirect.github.com/Swatinem/rust-cache/pull/212) - [@​danlec](https://redirect.github.com/danlec) made their first contribution in [https://github.com/Swatinem/rust-cache/pull/217](https://redirect.github.com/Swatinem/rust-cache/pull/217) - [@​rnbguy](https://redirect.github.com/rnbguy) made their first contribution in [https://github.com/Swatinem/rust-cache/pull/220](https://redirect.github.com/Swatinem/rust-cache/pull/220) - [@​benjyw](https://redirect.github.com/benjyw) made their first contribution in [https://github.com/Swatinem/rust-cache/pull/216](https://redirect.github.com/Swatinem/rust-cache/pull/216) **Full Changelog**: https://github.com/Swatinem/rust-cache/compare/v2.7.5...v2.7.6 ### [`v2.7.5`](https://redirect.github.com/Swatinem/rust-cache/releases/tag/v2.7.5) [Compare Source](https://redirect.github.com/Swatinem/rust-cache/compare/v2.7.3...v2.7.5) ##### What's Changed - Upgrade checkout action from version 3 to 4 by [@​carsten-wenderdel](https://redirect.github.com/carsten-wenderdel) in [https://github.com/Swatinem/rust-cache/pull/190](https://redirect.github.com/Swatinem/rust-cache/pull/190) - fix: usage of `deprecated` version of `node` by [@​hamirmahal](https://redirect.github.com/hamirmahal) in [https://github.com/Swatinem/rust-cache/pull/197](https://redirect.github.com/Swatinem/rust-cache/pull/197) - Only run macOsWorkaround() on macOS by [@​heksesang](https://redirect.github.com/heksesang) in [https://github.com/Swatinem/rust-cache/pull/206](https://redirect.github.com/Swatinem/rust-cache/pull/206) - Support Cargo.lock format cargo-lock v4 by [@​NobodyXu](https://redirect.github.com/NobodyXu) in [https://github.com/Swatinem/rust-cache/pull/211](https://redirect.github.com/Swatinem/rust-cache/pull/211) ##### New Contributors - [@​carsten-wenderdel](https://redirect.github.com/carsten-wenderdel) made their first contribution in [https://github.com/Swatinem/rust-cache/pull/190](https://redirect.github.com/Swatinem/rust-cache/pull/190) - [@​hamirmahal](https://redirect.github.com/hamirmahal) made their first contribution in [https://github.com/Swatinem/rust-cache/pull/197](https://redirect.github.com/Swatinem/rust-cache/pull/197) - [@​heksesang](https://redirect.github.com/heksesang) made their first contribution in [https://github.com/Swatinem/rust-cache/pull/206](https://redirect.github.com/Swatinem/rust-cache/pull/206) **Full Changelog**: https://github.com/Swatinem/rust-cache/compare/v2.7.3...v2.7.5 ### [`v2.7.3`](https://redirect.github.com/Swatinem/rust-cache/releases/tag/v2.7.3) [Compare Source](https://redirect.github.com/Swatinem/rust-cache/compare/v2.7.2...v2.7.3) - Work around upstream problem that causes cache saving to hang for minutes. **Full Changelog**: https://github.com/Swatinem/rust-cache/compare/v2.7.2...v2.7.3 ### [`v2.7.2`](https://redirect.github.com/Swatinem/rust-cache/releases/tag/v2.7.2) [Compare Source](https://redirect.github.com/Swatinem/rust-cache/compare/v2.7.1...v2.7.2) ##### What's Changed - Update action runtime to `node20` by [@​rhysd](https://redirect.github.com/rhysd) in [https://github.com/Swatinem/rust-cache/pull/175](https://redirect.github.com/Swatinem/rust-cache/pull/175) - Only key by `Cargo.toml` and `Cargo.lock` files of workspace members by [@​max-heller](https://redirect.github.com/max-heller) in [https://github.com/Swatinem/rust-cache/pull/180](https://redirect.github.com/Swatinem/rust-cache/pull/180) ##### New Contributors - [@​rhysd](https://redirect.github.com/rhysd) made their first contribution in [https://github.com/Swatinem/rust-cache/pull/175](https://redirect.github.com/Swatinem/rust-cache/pull/175) - [@​max-heller](https://redirect.github.com/max-heller) made their first contribution in [https://github.com/Swatinem/rust-cache/pull/180](https://redirect.github.com/Swatinem/rust-cache/pull/180) **Full Changelog**: https://github.com/Swatinem/rust-cache/compare/v2.7.1...v2.7.2 ### [`v2.7.1`](https://redirect.github.com/Swatinem/rust-cache/compare/v2.7.0...v2.7.1) [Compare Source](https://redirect.github.com/Swatinem/rust-cache/compare/v2.7.0...v2.7.1) ### [`v2.7.0`](https://redirect.github.com/Swatinem/rust-cache/releases/tag/v2.7.0) [Compare Source](https://redirect.github.com/Swatinem/rust-cache/compare/v2.6.2...v2.7.0) ##### What's Changed - Fix save-if documentation in readme by [@​rukai](https://redirect.github.com/rukai) in [https://github.com/Swatinem/rust-cache/pull/166](https://redirect.github.com/Swatinem/rust-cache/pull/166) - Support for `trybuild` and similar macro testing tools by [@​neysofu](https://redirect.github.com/neysofu) in [https://github.com/Swatinem/rust-cache/pull/168](https://redirect.github.com/Swatinem/rust-cache/pull/168) ##### New Contributors - [@​rukai](https://redirect.github.com/rukai) made their first contribution in [https://github.com/Swatinem/rust-cache/pull/166](https://redirect.github.com/Swatinem/rust-cache/pull/166) - [@​neysofu](https://redirect.github.com/neysofu) made their first contribution in [https://github.com/Swatinem/rust-cache/pull/168](https://redirect.github.com/Swatinem/rust-cache/pull/168) **Full Changelog**: https://github.com/Swatinem/rust-cache/compare/v2.6.2...v2.7.0 ### [`v2.6.2`](https://redirect.github.com/Swatinem/rust-cache/releases/tag/v2.6.2) [Compare Source](https://redirect.github.com/Swatinem/rust-cache/compare/v2.6.1...v2.6.2) ##### What's Changed - dep: Use `smol-toml` instead of `toml` by [@​NobodyXu](https://redirect.github.com/NobodyXu) in [https://github.com/Swatinem/rust-cache/pull/164](https://redirect.github.com/Swatinem/rust-cache/pull/164) **Full Changelog**: https://github.com/Swatinem/rust-cache/compare/v2...v2.6.2 ### [`v2.6.1`](https://redirect.github.com/Swatinem/rust-cache/releases/tag/v2.6.1) [Compare Source](https://redirect.github.com/Swatinem/rust-cache/compare/v2.6.0...v2.6.1) - Fix hash contributions of `Cargo.lock`/`Cargo.toml` files. ### [`v2.6.0`](https://redirect.github.com/Swatinem/rust-cache/releases/tag/v2.6.0) [Compare Source](https://redirect.github.com/Swatinem/rust-cache/compare/v2.5.1...v2.6.0) ##### What's Changed - Add "buildjet" as a second `cache-provider` backend [@​joroshiba](https://redirect.github.com/joroshiba) in [https://github.com/Swatinem/rust-cache/pull/154](https://redirect.github.com/Swatinem/rust-cache/pull/154) - Clean up sparse registry index. - Do not clean up src of `-sys` crates. - Remove `.cargo/credentials.toml` before saving. ##### New Contributors - [@​joroshiba](https://redirect.github.com/joroshiba) made their first contribution in [https://github.com/Swatinem/rust-cache/pull/154](https://redirect.github.com/Swatinem/rust-cache/pull/154) **Full Changelog**: https://github.com/Swatinem/rust-cache/compare/v2.5.1...v2.6.0 ### [`v2.5.1`](https://redirect.github.com/Swatinem/rust-cache/releases/tag/v2.5.1) [Compare Source](https://redirect.github.com/Swatinem/rust-cache/compare/v2.5.0...v2.5.1) - Fix hash contribution of `Cargo.lock`. ### [`v2.5.0`](https://redirect.github.com/Swatinem/rust-cache/releases/tag/v2.5.0) [Compare Source](https://redirect.github.com/Swatinem/rust-cache/compare/v2.4.0...v2.5.0) ##### What's Changed - feat: Rm workspace crates version before caching by [@​NobodyXu](https://redirect.github.com/NobodyXu) in [https://github.com/Swatinem/rust-cache/pull/147](https://redirect.github.com/Swatinem/rust-cache/pull/147) - feat: Add hash of `.cargo/config.toml` to key by [@​NobodyXu](https://redirect.github.com/NobodyXu) in [https://github.com/Swatinem/rust-cache/pull/149](https://redirect.github.com/Swatinem/rust-cache/pull/149) ##### New Contributors - [@​NobodyXu](https://redirect.github.com/NobodyXu) made their first contribution in [https://github.com/Swatinem/rust-cache/pull/147](https://redirect.github.com/Swatinem/rust-cache/pull/147) **Full Changelog**: https://github.com/Swatinem/rust-cache/compare/v2.4.0...v2.5.0 ### [`v2.4.0`](https://redirect.github.com/Swatinem/rust-cache/releases/tag/v2.4.0) [Compare Source](https://redirect.github.com/Swatinem/rust-cache/compare/v2.3.0...v2.4.0) - Fix cache key stability. - Use 8 character hash components to reduce the key length, making it more readable. ### [`v2.3.0`](https://redirect.github.com/Swatinem/rust-cache/releases/tag/v2.3.0) [Compare Source](https://redirect.github.com/Swatinem/rust-cache/compare/v2.2.1...v2.3.0) - Add `cache-all-crates` option, which enables caching of crates installed by workflows. - Add installed packages to cache key, so changes to workflows that install rust tools are detected and cached properly. - Fix cache restore failures due to upstream bug. - Fix `EISDIR` error due to globed directories. - Update runtime `@actions/cache`, `@actions/io` and dev `typescript` dependencies. - Update `npm run prepare` so it creates distribution files with the right line endings. ### [`v2.2.1`](https://redirect.github.com/Swatinem/rust-cache/releases/tag/v2.2.1) [Compare Source](https://redirect.github.com/Swatinem/rust-cache/compare/v2.2.0...v2.2.1) - Update `@actions/cache` dependency to fix usage of `zstd` compression. ### [`v2.2.0`](https://redirect.github.com/Swatinem/rust-cache/releases/tag/v2.2.0) [Compare Source](https://redirect.github.com/Swatinem/rust-cache/compare/v2.1.0...v2.2.0) - Add new `save-if` option to always restore, but only conditionally save the cache. ### [`v2.1.0`](https://redirect.github.com/Swatinem/rust-cache/releases/tag/v2.1.0) [Compare Source](https://redirect.github.com/Swatinem/rust-cache/compare/v2.0.2...v2.1.0) - Only hash `Cargo.{lock,toml}` files in the configured workspace directories. ### [`v2.0.2`](https://redirect.github.com/Swatinem/rust-cache/releases/tag/v2.0.2) [Compare Source](https://redirect.github.com/Swatinem/rust-cache/compare/v2.0.1...v2.0.2) - Avoid calling cargo metadata on pre-cleanup. - Added `prefix-key`, `cache-directories` and `cache-targets` options. ### [`v2.0.1`](https://redirect.github.com/Swatinem/rust-cache/releases/tag/v2.0.1) [Compare Source](https://redirect.github.com/Swatinem/rust-cache/compare/v2...v2.0.1) - Primarily just updating dependencies to fix GitHub deprecation notices. </details> --- ### Configuration 📅 **Schedule**: Branch creation - "before 4am on Monday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/astral-sh/ruff). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4yMjcuMyIsInVwZGF0ZWRJblZlciI6IjM5LjIyNy4zIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJpbnRlcm5hbCJdfQ==--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
145 lines
5.1 KiB
YAML
145 lines
5.1 KiB
YAML
# Publish the Ruff documentation.
|
|
#
|
|
# Assumed to run as a subworkflow of .github/workflows/release.yml; specifically, as a post-announce
|
|
# job within `cargo-dist`.
|
|
name: mkdocs
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
ref:
|
|
description: "The commit SHA, tag, or branch to publish. Uses the default branch if not specified."
|
|
default: ""
|
|
type: string
|
|
workflow_call:
|
|
inputs:
|
|
plan:
|
|
required: true
|
|
type: string
|
|
|
|
jobs:
|
|
mkdocs:
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
MKDOCS_INSIDERS_SSH_KEY_EXISTS: ${{ secrets.MKDOCS_INSIDERS_SSH_KEY != '' }}
|
|
steps:
|
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
with:
|
|
ref: ${{ inputs.ref }}
|
|
persist-credentials: true
|
|
|
|
- uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5
|
|
with:
|
|
python-version: 3.12
|
|
|
|
- name: "Set docs version"
|
|
env:
|
|
version: ${{ (inputs.plan != '' && fromJson(inputs.plan).announcement_tag) || inputs.ref }}
|
|
run: |
|
|
# if version is missing, use 'latest'
|
|
if [ -z "$version" ]; then
|
|
echo "Using 'latest' as version"
|
|
version="latest"
|
|
fi
|
|
|
|
# Use version as display name for now
|
|
display_name="$version"
|
|
|
|
echo "version=$version" >> "$GITHUB_ENV"
|
|
echo "display_name=$display_name" >> "$GITHUB_ENV"
|
|
|
|
- name: "Set branch name"
|
|
run: |
|
|
timestamp="$(date +%s)"
|
|
|
|
# create branch_display_name from display_name by replacing all
|
|
# characters disallowed in git branch names with hyphens
|
|
branch_display_name="$(echo "${display_name}" | tr -c '[:alnum:]._' '-' | tr -s '-')"
|
|
|
|
echo "branch_name=update-docs-$branch_display_name-$timestamp" >> "$GITHUB_ENV"
|
|
echo "timestamp=$timestamp" >> "$GITHUB_ENV"
|
|
|
|
- name: "Add SSH key"
|
|
if: ${{ env.MKDOCS_INSIDERS_SSH_KEY_EXISTS == 'true' }}
|
|
uses: webfactory/ssh-agent@a6f90b1f127823b31d4d4a8d96047790581349bd # v0.9.1
|
|
with:
|
|
ssh-private-key: ${{ secrets.MKDOCS_INSIDERS_SSH_KEY }}
|
|
|
|
- name: "Install Rust toolchain"
|
|
run: rustup show
|
|
|
|
- uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 # v2.7.8
|
|
|
|
- name: "Install Insiders dependencies"
|
|
if: ${{ env.MKDOCS_INSIDERS_SSH_KEY_EXISTS == 'true' }}
|
|
run: pip install -r docs/requirements-insiders.txt
|
|
|
|
- name: "Install dependencies"
|
|
if: ${{ env.MKDOCS_INSIDERS_SSH_KEY_EXISTS != 'true' }}
|
|
run: pip install -r docs/requirements.txt
|
|
|
|
- name: "Copy README File"
|
|
run: |
|
|
python scripts/transform_readme.py --target mkdocs
|
|
python scripts/generate_mkdocs.py
|
|
|
|
- name: "Build Insiders docs"
|
|
if: ${{ env.MKDOCS_INSIDERS_SSH_KEY_EXISTS == 'true' }}
|
|
run: mkdocs build --strict -f mkdocs.insiders.yml
|
|
|
|
- name: "Build docs"
|
|
if: ${{ env.MKDOCS_INSIDERS_SSH_KEY_EXISTS != 'true' }}
|
|
run: mkdocs build --strict -f mkdocs.public.yml
|
|
|
|
- name: "Clone docs repo"
|
|
run: git clone https://${{ secrets.ASTRAL_DOCS_PAT }}@github.com/astral-sh/docs.git astral-docs
|
|
|
|
- name: "Copy docs"
|
|
run: rm -rf astral-docs/site/ruff && mkdir -p astral-docs/site && cp -r site/ruff astral-docs/site/
|
|
|
|
- name: "Commit docs"
|
|
working-directory: astral-docs
|
|
run: |
|
|
git config user.name "astral-docs-bot"
|
|
git config user.email "176161322+astral-docs-bot@users.noreply.github.com"
|
|
|
|
git checkout -b "${branch_name}"
|
|
git add site/ruff
|
|
git commit -m "Update ruff documentation for $version"
|
|
|
|
- name: "Create Pull Request"
|
|
working-directory: astral-docs
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.ASTRAL_DOCS_PAT }}
|
|
run: |
|
|
# set the PR title
|
|
pull_request_title="Update ruff documentation for ${display_name}"
|
|
|
|
# Delete any existing pull requests that are open for this version
|
|
# by checking against pull_request_title because the new PR will
|
|
# supersede the old one.
|
|
gh pr list --state open --json title --jq '.[] | select(.title == "$pull_request_title") | .number' | \
|
|
xargs -I {} gh pr close {}
|
|
|
|
# push the branch to GitHub
|
|
git push origin "${branch_name}"
|
|
|
|
# create the PR
|
|
gh pr create \
|
|
--base=main \
|
|
--head="${branch_name}" \
|
|
--title="${pull_request_title}" \
|
|
--body="Automated documentation update for ${display_name}" \
|
|
--label="documentation"
|
|
|
|
- name: "Merge Pull Request"
|
|
if: ${{ inputs.plan != '' && !fromJson(inputs.plan).announcement_tag_is_implicit }}
|
|
working-directory: astral-docs
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.ASTRAL_DOCS_PAT }}
|
|
run: |
|
|
# auto-merge the PR if the build was triggered by a release. Manual builds should be reviewed by a human.
|
|
# give the PR a few seconds to be created before trying to auto-merge it
|
|
sleep 10
|
|
gh pr merge --squash "${branch_name}"
|