From 7b1c307e0dcbda6122208f10795a713336a9b35a Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Thu, 8 Aug 2024 10:36:24 -0700 Subject: [PATCH 01/23] Add 1.80.1 patch release --- scripts/update-revs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/update-revs.sh b/scripts/update-revs.sh index c5c7841..c60b6a2 100755 --- a/scripts/update-revs.sh +++ b/scripts/update-revs.sh @@ -10,7 +10,7 @@ fi patch_releases=( 1.12.1 1.15.1 1.22.1 1.24.1 1.26.1 1.26.2 1.27.1 1.27.2 1.29.1 1.29.2 1.30.1 1.31.1 1.34.1 1.34.2 1.41.1 1.43.1 1.44.1 1.45.1 1.45.2 1.52.1 1.56.1 1.58.1 - 1.62.1 1.66.1 1.67.1 1.68.1 1.68.2 1.71.1 1.72.1 1.74.1 1.77.1 1.77.2 + 1.62.1 1.66.1 1.67.1 1.68.1 1.68.2 1.71.1 1.72.1 1.74.1 1.77.1 1.77.2 1.80.1 ) releases() { From 2d6236e91401c108098a0258d12d5a0699b7aab9 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Sun, 17 Nov 2024 20:09:42 -0800 Subject: [PATCH 02/23] Ignore 'rustup default' failure --- action.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/action.yml b/action.yml index 23c6000..b050545 100644 --- a/action.yml +++ b/action.yml @@ -79,6 +79,7 @@ runs: - run: rustup default ${{steps.parse.outputs.toolchain}} shell: bash + continue-on-error: true # https://github.com/dtolnay/rust-toolchain/issues/127 - id: rustc-version run: | From aacd1c2ea38f9692a2404f67255753ea50fdc909 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Fri, 13 Dec 2024 20:00:13 -0800 Subject: [PATCH 03/23] Append zeros to toolchain versions truncated by GitHub --- action.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/action.yml b/action.yml index b050545..5281d42 100644 --- a/action.yml +++ b/action.yml @@ -41,6 +41,8 @@ runs: fi elif [[ $toolchain =~ ^stable' 'minus' '[0-9]+' 'releases?$ ]]; then echo "toolchain=1.$((($(date +%s)/60/60/24-16569)/7/6-${toolchain//[^0-9]/}))" >> $GITHUB_OUTPUT + elif [[ $toolchain =~ ^1\.[0-9]+$ ]]; then + echo "toolchain=1.$((i=${toolchain#1.}, c=($(date +%s)/60/60/24-16569)/7/6, i+9*i*(10*i<=c)+90*i*(100*i<=c)))" >> $GITHUB_OUTPUT else echo "toolchain=$toolchain" >> $GITHUB_OUTPUT fi From c5a29ddb4d9d194e7c84ec8c3fba61b1c31fee8c Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Thu, 30 Jan 2025 11:16:25 -0800 Subject: [PATCH 04/23] Add 1.84.1 patch release --- scripts/update-revs.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/update-revs.sh b/scripts/update-revs.sh index c60b6a2..462b223 100755 --- a/scripts/update-revs.sh +++ b/scripts/update-revs.sh @@ -11,6 +11,7 @@ patch_releases=( 1.12.1 1.15.1 1.22.1 1.24.1 1.26.1 1.26.2 1.27.1 1.27.2 1.29.1 1.29.2 1.30.1 1.31.1 1.34.1 1.34.2 1.41.1 1.43.1 1.44.1 1.45.1 1.45.2 1.52.1 1.56.1 1.58.1 1.62.1 1.66.1 1.67.1 1.68.1 1.68.2 1.71.1 1.72.1 1.74.1 1.77.1 1.77.2 1.80.1 + 1.84.1 ) releases() { From 888c2e1ea69ab0d4330cbf0af1ecc7b68f368cc1 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Fri, 14 Mar 2025 20:08:14 -0700 Subject: [PATCH 05/23] Predefine branches up to 1.100 --- scripts/update-revs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/update-revs.sh b/scripts/update-revs.sh index 462b223..84693a3 100755 --- a/scripts/update-revs.sh +++ b/scripts/update-revs.sh @@ -15,7 +15,7 @@ patch_releases=( ) releases() { - printf "%s\n" 1.{0..90}.0 ${patch_releases[@]} | sort -V + printf "%s\n" 1.{0..100}.0 ${patch_releases[@]} | sort -V } base=$(git rev-parse HEAD) From 56f84321dbccf38fb67ce29ab63e4754056677e0 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Tue, 18 Mar 2025 12:14:28 -0700 Subject: [PATCH 06/23] Add 1.85.1 patch release --- scripts/update-revs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/update-revs.sh b/scripts/update-revs.sh index 84693a3..697d135 100755 --- a/scripts/update-revs.sh +++ b/scripts/update-revs.sh @@ -11,7 +11,7 @@ patch_releases=( 1.12.1 1.15.1 1.22.1 1.24.1 1.26.1 1.26.2 1.27.1 1.27.2 1.29.1 1.29.2 1.30.1 1.31.1 1.34.1 1.34.2 1.41.1 1.43.1 1.44.1 1.45.1 1.45.2 1.52.1 1.56.1 1.58.1 1.62.1 1.66.1 1.67.1 1.68.1 1.68.2 1.71.1 1.72.1 1.74.1 1.77.1 1.77.2 1.80.1 - 1.84.1 + 1.84.1 1.85.1 ) releases() { From d8b2468e886a4199f8b3649f19cdf3d75cb15cd5 Mon Sep 17 00:00:00 2001 From: Joe Polny Date: Tue, 29 Apr 2025 13:50:15 -0400 Subject: [PATCH 07/23] Install rustup on windows (including ARM) The x86 logic might be overkill since right now x86 Windows images already have it installed, but figured might as well support it just in case. Closes #143 --- action.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/action.yml b/action.yml index 5281d42..79bbd03 100644 --- a/action.yml +++ b/action.yml @@ -75,6 +75,16 @@ runs: if: runner.os != 'Windows' shell: bash + - run: | + : install rustup if needed on windows + if ! command -v rustup &>/dev/null; then + curl -LOs https://static.rust-lang.org/rustup/dist/${{ runner.arch == 'ARM64' && 'aarch64' || 'x86_64' }}-pc-windows-msvc/rustup-init.exe + ./rustup-init.exe -y --default-toolchain none --no-modify-path + echo "$USERPROFILE/.cargo/bin" >> "$GITHUB_PATH" + fi + if: runner.os == 'Windows' + shell: bash + - name: rustup toolchain install ${{steps.parse.outputs.toolchain}} run: rustup toolchain install ${{steps.parse.outputs.toolchain}}${{steps.flags.outputs.targets}}${{steps.flags.outputs.components}} --profile minimal${{steps.flags.outputs.downgrade}} --no-self-update shell: bash From 113d6388db4c8b4861ba2d5103dd4c1520cac909 Mon Sep 17 00:00:00 2001 From: Joe Polny Date: Tue, 29 Apr 2025 14:01:03 -0400 Subject: [PATCH 08/23] Add ubuntu and windows arm to CI --- .github/workflows/ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 39b7cef..0c593ab 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,15 +12,15 @@ permissions: jobs: install: - name: Rust ${{matrix.rust}} on ${{matrix.os == 'ubuntu' && 'Linux' || matrix.os == 'macos' && 'macOS' || matrix.os == 'windows' && 'Windows' || '???'}} - runs-on: ${{matrix.os}}-latest + name: Rust ${{matrix.rust}} on ${{matrix.os}} + runs-on: ${{matrix.os}} strategy: fail-fast: false matrix: - os: [ubuntu, macos, windows] + os: [ubuntu-latest, macos-latest, windows-latest, windows-11-arm, ubuntu-22.04-arm] rust: [nightly, beta, stable, 1.62.0, stable 18 months ago, stable minus 8 releases] include: - - os: ubuntu + - os: ubuntu-latest rust: 1.0.0 timeout-minutes: 45 steps: From 1c80aedd72f6b55cdffe0b63b7298a9a27d7080d Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Tue, 29 Apr 2025 11:36:50 -0700 Subject: [PATCH 09/23] Align curl and rustup-init flags between windows and non-windows --- action.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/action.yml b/action.yml index 79bbd03..d7b092a 100644 --- a/action.yml +++ b/action.yml @@ -69,7 +69,7 @@ runs: - run: | : install rustup if needed if ! command -v rustup &>/dev/null; then - curl --proto '=https' --tlsv1.2 --retry 10 --retry-connrefused --location --silent --show-error --fail "https://sh.rustup.rs" | sh -s -- --default-toolchain none -y + curl --proto '=https' --tlsv1.2 --retry 10 --retry-connrefused --location --silent --show-error --fail https://sh.rustup.rs | sh -s -- --default-toolchain none -y echo "$CARGO_HOME/bin" >> $GITHUB_PATH fi if: runner.os != 'Windows' @@ -78,9 +78,9 @@ runs: - run: | : install rustup if needed on windows if ! command -v rustup &>/dev/null; then - curl -LOs https://static.rust-lang.org/rustup/dist/${{ runner.arch == 'ARM64' && 'aarch64' || 'x86_64' }}-pc-windows-msvc/rustup-init.exe - ./rustup-init.exe -y --default-toolchain none --no-modify-path - echo "$USERPROFILE/.cargo/bin" >> "$GITHUB_PATH" + curl --proto '=https' --tlsv1.2 --retry 10 --retry-connrefused --location --silent --show-error --fail --remote-name https://static.rust-lang.org/rustup/dist/${{ runner.arch == 'ARM64' && 'aarch64' || 'x86_64' }}-pc-windows-msvc/rustup-init.exe + ./rustup-init.exe --default-toolchain none --no-modify-path -y + echo "$USERPROFILE/.cargo/bin" >> $GITHUB_PATH fi if: runner.os == 'Windows' shell: bash From 1f3b09e73e33ebceb2205a60e7b0b8de0a5e0b7b Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Tue, 29 Apr 2025 11:42:31 -0700 Subject: [PATCH 10/23] Download rustup-init.exe to temp dir instead of current dir --- action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/action.yml b/action.yml index d7b092a..18f8e55 100644 --- a/action.yml +++ b/action.yml @@ -78,8 +78,8 @@ runs: - run: | : install rustup if needed on windows if ! command -v rustup &>/dev/null; then - curl --proto '=https' --tlsv1.2 --retry 10 --retry-connrefused --location --silent --show-error --fail --remote-name https://static.rust-lang.org/rustup/dist/${{ runner.arch == 'ARM64' && 'aarch64' || 'x86_64' }}-pc-windows-msvc/rustup-init.exe - ./rustup-init.exe --default-toolchain none --no-modify-path -y + curl --proto '=https' --tlsv1.2 --retry 10 --retry-connrefused --location --silent --show-error --fail https://static.rust-lang.org/rustup/dist/${{ runner.arch == 'ARM64' && 'aarch64' || 'x86_64' }}-pc-windows-msvc/rustup-init.exe --output '${{runner.temp}}\rustup-init.exe' + '${{runner.temp}}\rustup-init.exe' --default-toolchain none --no-modify-path -y echo "$USERPROFILE/.cargo/bin" >> $GITHUB_PATH fi if: runner.os == 'Windows' From 802126c77d87c59c86423d5aae014ef82a599ce8 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Tue, 29 Apr 2025 11:58:18 -0700 Subject: [PATCH 11/23] Consistently use backslash directories on Windows --- action.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/action.yml b/action.yml index 18f8e55..053c4a0 100644 --- a/action.yml +++ b/action.yml @@ -63,14 +63,14 @@ runs: - run: | : set $CARGO_HOME - echo CARGO_HOME=${CARGO_HOME:-${{runner.os == 'Windows' && '$USERPROFILE' || '$HOME'}}/.cargo} >> $GITHUB_ENV + echo CARGO_HOME=${CARGO_HOME:-'${{runner.os == 'Windows' && '$USERPROFILE\.cargo' || '$HOME/.cargo'}}'} >> $GITHUB_ENV shell: bash - run: | : install rustup if needed if ! command -v rustup &>/dev/null; then curl --proto '=https' --tlsv1.2 --retry 10 --retry-connrefused --location --silent --show-error --fail https://sh.rustup.rs | sh -s -- --default-toolchain none -y - echo "$CARGO_HOME/bin" >> $GITHUB_PATH + echo '$CARGO_HOME/bin' >> $GITHUB_PATH fi if: runner.os != 'Windows' shell: bash @@ -80,7 +80,7 @@ runs: if ! command -v rustup &>/dev/null; then curl --proto '=https' --tlsv1.2 --retry 10 --retry-connrefused --location --silent --show-error --fail https://static.rust-lang.org/rustup/dist/${{ runner.arch == 'ARM64' && 'aarch64' || 'x86_64' }}-pc-windows-msvc/rustup-init.exe --output '${{runner.temp}}\rustup-init.exe' '${{runner.temp}}\rustup-init.exe' --default-toolchain none --no-modify-path -y - echo "$USERPROFILE/.cargo/bin" >> $GITHUB_PATH + echo '$USERPROFILE\.cargo\bin' >> $GITHUB_PATH fi if: runner.os == 'Windows' shell: bash From f36efbae07412b50fdfff84f529028c7096ba259 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Tue, 29 Apr 2025 12:09:07 -0700 Subject: [PATCH 12/23] Fix GITHUB_PATH --- action.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/action.yml b/action.yml index 053c4a0..74519b3 100644 --- a/action.yml +++ b/action.yml @@ -63,14 +63,14 @@ runs: - run: | : set $CARGO_HOME - echo CARGO_HOME=${CARGO_HOME:-'${{runner.os == 'Windows' && '$USERPROFILE\.cargo' || '$HOME/.cargo'}}'} >> $GITHUB_ENV + echo CARGO_HOME=${CARGO_HOME:-"${{runner.os == 'Windows' && '$USERPROFILE\.cargo' || '$HOME/.cargo'}}"} >> $GITHUB_ENV shell: bash - run: | : install rustup if needed if ! command -v rustup &>/dev/null; then curl --proto '=https' --tlsv1.2 --retry 10 --retry-connrefused --location --silent --show-error --fail https://sh.rustup.rs | sh -s -- --default-toolchain none -y - echo '$CARGO_HOME/bin' >> $GITHUB_PATH + echo "$CARGO_HOME/bin" >> $GITHUB_PATH fi if: runner.os != 'Windows' shell: bash @@ -80,7 +80,7 @@ runs: if ! command -v rustup &>/dev/null; then curl --proto '=https' --tlsv1.2 --retry 10 --retry-connrefused --location --silent --show-error --fail https://static.rust-lang.org/rustup/dist/${{ runner.arch == 'ARM64' && 'aarch64' || 'x86_64' }}-pc-windows-msvc/rustup-init.exe --output '${{runner.temp}}\rustup-init.exe' '${{runner.temp}}\rustup-init.exe' --default-toolchain none --no-modify-path -y - echo '$USERPROFILE\.cargo\bin' >> $GITHUB_PATH + echo "$USERPROFILE\.cargo\bin" >> $GITHUB_PATH fi if: runner.os == 'Windows' shell: bash From eceb16e78c7dba252604060bc8d089c511dd6b7d Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Tue, 29 Apr 2025 12:09:58 -0700 Subject: [PATCH 13/23] Respect pre-existing CARGO_HOME on Windows --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 74519b3..2b76568 100644 --- a/action.yml +++ b/action.yml @@ -80,7 +80,7 @@ runs: if ! command -v rustup &>/dev/null; then curl --proto '=https' --tlsv1.2 --retry 10 --retry-connrefused --location --silent --show-error --fail https://static.rust-lang.org/rustup/dist/${{ runner.arch == 'ARM64' && 'aarch64' || 'x86_64' }}-pc-windows-msvc/rustup-init.exe --output '${{runner.temp}}\rustup-init.exe' '${{runner.temp}}\rustup-init.exe' --default-toolchain none --no-modify-path -y - echo "$USERPROFILE\.cargo\bin" >> $GITHUB_PATH + echo "$CARGO_HOME\bin" >> $GITHUB_PATH fi if: runner.os == 'Windows' shell: bash From d69c8f6cd52ebafebc5f69693edd9af1181555ab Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Tue, 29 Apr 2025 12:07:34 -0700 Subject: [PATCH 14/23] Use rustup.rs advertised download URLs --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 2b76568..5d5cd1c 100644 --- a/action.yml +++ b/action.yml @@ -78,7 +78,7 @@ runs: - run: | : install rustup if needed on windows if ! command -v rustup &>/dev/null; then - curl --proto '=https' --tlsv1.2 --retry 10 --retry-connrefused --location --silent --show-error --fail https://static.rust-lang.org/rustup/dist/${{ runner.arch == 'ARM64' && 'aarch64' || 'x86_64' }}-pc-windows-msvc/rustup-init.exe --output '${{runner.temp}}\rustup-init.exe' + curl --proto '=https' --tlsv1.2 --retry 10 --retry-connrefused --location --silent --show-error --fail https://win.rustup.rs/${{runner.arch == 'ARM64' && 'aarch64' || 'x86_64'}} --output '${{runner.temp}}\rustup-init.exe' '${{runner.temp}}\rustup-init.exe' --default-toolchain none --no-modify-path -y echo "$CARGO_HOME\bin" >> $GITHUB_PATH fi From 6ff96e92a9257c99b1465dfa039b4a9eb9acc9dd Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Tue, 29 Apr 2025 12:19:55 -0700 Subject: [PATCH 15/23] Clean up trailing whitespace from PR 145 --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 5d5cd1c..c68a596 100644 --- a/action.yml +++ b/action.yml @@ -84,7 +84,7 @@ runs: fi if: runner.os == 'Windows' shell: bash - + - name: rustup toolchain install ${{steps.parse.outputs.toolchain}} run: rustup toolchain install ${{steps.parse.outputs.toolchain}}${{steps.flags.outputs.targets}}${{steps.flags.outputs.components}} --profile minimal${{steps.flags.outputs.downgrade}} --no-self-update shell: bash From 87f07835889b686aca1fb3733c2aa2d61586c1e1 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Fri, 22 Aug 2025 16:56:55 -0700 Subject: [PATCH 16/23] Enforce that required toolchain input is provided --- action.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/action.yml b/action.yml index c68a596..b48984a 100644 --- a/action.yml +++ b/action.yml @@ -33,7 +33,11 @@ runs: - id: parse run: | : parse toolchain version - if [[ $toolchain =~ ^stable' '[0-9]+' '(year|month|week|day)s?' 'ago$ ]]; then + if [[ -z $toolchain ]]; then + # GitHub does not enforce `required: true` inputs itself. https://github.com/actions/runner/issues/1070 + echo "'toolchain' is a required input" >&2 + exit 1 + elif [[ $toolchain =~ ^stable' '[0-9]+' '(year|month|week|day)s?' 'ago$ ]]; then if [[ ${{runner.os}} == macOS ]]; then echo "toolchain=1.$((($(date -v-$(sed 's/stable \([0-9]*\) \(.\).*/\1\2/' <<< $toolchain) +%s)/60/60/24-16569)/7/6))" >> $GITHUB_OUTPUT else From 57e40976e026c43fa403effa33c37ce1b7723d1a Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Fri, 22 Aug 2025 17:17:02 -0700 Subject: [PATCH 17/23] Update example version number to a recent one --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 2ea5437..5460e42 100644 --- a/README.md +++ b/README.md @@ -23,8 +23,8 @@ jobs: The selection of Rust toolchain is made based on the particular @rev of this Action being requested. For example "dtolnay/rust-toolchain@nightly" pulls in -the nightly Rust toolchain, while "dtolnay/rust-toolchain@1.42.0" pulls in -1.42.0. +the nightly Rust toolchain, while "dtolnay/rust-toolchain@1.89.0" pulls in +1.89.0.
@@ -40,7 +40,7 @@ All inputs are optional. toolchain - Rustup toolchain specifier e.g. stable, nightly, 1.42.0, nightly-2022-01-01. + Rustup toolchain specifier e.g. stable, nightly, 1.89.0, nightly-2025-01-01. Important: the default is to match the @rev as described above. When passing an explicit toolchain as an input instead of @rev, you'll want to use "dtolnay/rust-toolchain@master" as the revision of the action. @@ -66,7 +66,7 @@ All inputs are optional. cachekey - A short hash of the installed rustc version, appropriate for use as a cache key. "20220627a831" + A short hash of the installed rustc version, appropriate for use as a cache key. "20250627a831" name From ed196ec4b4fbeb06a88eac6d3a3a507755d023b5 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Fri, 22 Aug 2025 17:21:50 -0700 Subject: [PATCH 18/23] Add note about full-length SHA --- README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/README.md b/README.md index 5460e42..b2900d2 100644 --- a/README.md +++ b/README.md @@ -99,6 +99,18 @@ compiler support.
+## Choice of full-length commit SHA + +In a workflow that [pins the action][pin] using a full-length commit SHA (as +opposed to something like @nightly or @1.89.0) it is required that you pick a +SHA that is within the history of the master branch. Any commit that is not +within the history of master will eventually get garbage-collected and your +workflows will fail. + +[pin]: https://docs.github.com/en/actions/reference/security/secure-use#using-third-party-actions + +
+ ## License The scripts and documentation in this project are released under the [MIT From f6642a8e0a569a4651d01b5f17a7d9a0b408798a Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Fri, 22 Aug 2025 17:39:26 -0700 Subject: [PATCH 19/23] Try without backtick? --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index b48984a..7a53b68 100644 --- a/action.yml +++ b/action.yml @@ -34,7 +34,7 @@ runs: run: | : parse toolchain version if [[ -z $toolchain ]]; then - # GitHub does not enforce `required: true` inputs itself. https://github.com/actions/runner/issues/1070 + # GitHub does not enforce 'required: true' inputs itself. https://github.com/actions/runner/issues/1070 echo "'toolchain' is a required input" >&2 exit 1 elif [[ $toolchain =~ ^stable' '[0-9]+' '(year|month|week|day)s?' 'ago$ ]]; then From 6ded28b5b7b04809225ecea4f9e588c191507e09 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Fri, 22 Aug 2025 17:39:26 -0700 Subject: [PATCH 20/23] Try without comment? --- action.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/action.yml b/action.yml index 7a53b68..3bba17a 100644 --- a/action.yml +++ b/action.yml @@ -34,7 +34,6 @@ runs: run: | : parse toolchain version if [[ -z $toolchain ]]; then - # GitHub does not enforce 'required: true' inputs itself. https://github.com/actions/runner/issues/1070 echo "'toolchain' is a required input" >&2 exit 1 elif [[ $toolchain =~ ^stable' '[0-9]+' '(year|month|week|day)s?' 'ago$ ]]; then From 0185c0604231e18106b0f6fc3bdf12e3388029e7 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Fri, 22 Aug 2025 17:57:03 -0700 Subject: [PATCH 21/23] Fix update-revs.sh to recognize only the intended `required: true` --- action.yml | 1 + scripts/update-revs.sh | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 3bba17a..b48984a 100644 --- a/action.yml +++ b/action.yml @@ -34,6 +34,7 @@ runs: run: | : parse toolchain version if [[ -z $toolchain ]]; then + # GitHub does not enforce `required: true` inputs itself. https://github.com/actions/runner/issues/1070 echo "'toolchain' is a required input" >&2 exit 1 elif [[ $toolchain =~ ^stable' '[0-9]+' '(year|month|week|day)s?' 'ago$ ]]; then diff --git a/scripts/update-revs.sh b/scripts/update-revs.sh index 697d135..1d5006e 100755 --- a/scripts/update-revs.sh +++ b/scripts/update-revs.sh @@ -33,7 +33,7 @@ for rev in `releases` stable beta nightly; do if [[ $rev == 1* ]]; then sed -i "/^ toolchain:/,+2d; s/\${{inputs\.toolchain}}/$rev/" action.yml else - sed -i "s/required: true/required: false\n default: $rev/" action.yml + sed -i "s/^ required: true$/ required: false\n default: $rev/" action.yml fi git add action.yml git commit --quiet --message "toolchain: $rev" From e97e2d8cc328f1b50210efc529dca0028893a2d9 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Fri, 22 Aug 2025 18:20:49 -0700 Subject: [PATCH 22/23] Update actions/checkout@v4 -> v5 --- .github/workflows/ci.yml | 2 +- README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0c593ab..a453f37 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,7 +24,7 @@ jobs: rust: 1.0.0 timeout-minutes: 45 steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - uses: ./ name: Run dtolnay/rust-toolchain${{contains(matrix.rust, ' ') && ' for ' || '@'}}${{matrix.rust}} id: toolchain diff --git a/README.md b/README.md index b2900d2..fc44f15 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ jobs: name: cargo test runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - uses: dtolnay/rust-toolchain@stable - run: cargo test --all-features ``` From 526cde26bf44b6c52147bd19a6d30aac9f6f4e2a Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Fri, 22 Aug 2025 18:27:28 -0700 Subject: [PATCH 23/23] toolchain: 1.91.0 --- action.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/action.yml b/action.yml index b48984a..bea2792 100644 --- a/action.yml +++ b/action.yml @@ -6,9 +6,6 @@ branding: color: purple inputs: - toolchain: - description: Rust toolchain specification -- see https://rust-lang.github.io/rustup/concepts/toolchains.html#toolchain-specification - required: true targets: description: Comma-separated list of target triples to install for this toolchain required: false @@ -51,7 +48,7 @@ runs: echo "toolchain=$toolchain" >> $GITHUB_OUTPUT fi env: - toolchain: ${{inputs.toolchain}} + toolchain: 1.91.0 shell: bash - id: flags