[GH-ISSUE #1602] using dtolnay/rust-toolchain makes act failing #802

Closed
opened 2026-03-01 21:46:30 +03:00 by kerem · 2 comments
Owner

Originally created by @doums on GitHub (Feb 2, 2023).
Original GitHub issue: https://github.com/nektos/act/issues/1602

Bug report info

act version:            0.2.34
GOOS:                   linux
GOARCH:                 amd64
NumCPU:                 8
Docker host:            DOCKER_HOST environment variable is unset/empty.
Sockets found:
        /var/run/docker.sock
Config files:           
        /home/pierre/.actrc:
                -P ubuntu-latest=catthehacker/ubuntu:rust-latest
Build info:
        Go version:            go1.19.4
        Module path:           github.com/nektos/act
        Main version:          (devel)
        Main path:             github.com/nektos/act
        Main checksum:         
        Build settings:
                -compiler:            gc
                -trimpath:            true
                CGO_ENABLED:          1
                GOARCH:               amd64
                GOOS:                 linux
                GOAMD64:              v1
Docker Engine:
        Engine version:        20.10.23
        Engine runtime:        runc
        Cgroup version:        2
        Cgroup driver:         systemd
        Storage driver:        overlay2
        Registry URI:          https://index.docker.io/v1/
        OS:                    Arch Linux
        OS type:               linux
        OS version:            
        OS arch:               x86_64
        OS kernel:             6.1.8-arch1-1
        OS CPU:                8
        OS memory:             32031 MB
        Security options:
                name=seccomp,profile=default
                name=cgroupns

Command used with act

act -W .github/workflows/example.yml

Describe issue

running dtolnay/rust-toolchain action should succeed

No response

Workflow content

name: Test with act

on:
  workflow_dispatch:

jobs:
  build:
    runs-on: ubuntu-latest
    steps:

      - name: Checkout
        uses: actions/checkout@v3

      - name: Install Rust toolchain
        uses: dtolnay/rust-toolchain@stable
        with:
          components: clippy

Relevant log output

[Test with act/build] ⭐ Run Main : parse toolchain version
if [[ $toolchain =~ ^stable' '[0-9]+' '(year|month|week|day)s?' 'ago$ ]]; then
  if [[ Linux == macOS ]]; then
    echo "toolchain=1.$((($(date -v-$(sed 's/stable \([0-9]*\) \(.\).*/\1\2/' <<< $toolchain) +%s)/60/6
0/24-16569)/7/6))" >> $GITHUB_OUTPUT
  else
    echo "toolchain=1.$((($(date --date "${toolchain#stable }" +%s)/60/60/24-16569)/7/6))" >> $GITHUB_O
UTPUT
  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
else
  echo "toolchain=$toolchain" >> $GITHUB_OUTPUT
fi
[Test with act/build]   🐳  docker exec cmd=[bash --noprofile --norc -e -o pipefail /var/run/act/workfl
ow/1-composite-parse.sh] user= workdir=
[Test with act/build]   ✅  Success - Main : parse toolchain version
if [[ $toolchain =~ ^stable' '[0-9]+' '(year|month|week|day)s?' 'ago$ ]]; then
  if [[ Linux == macOS ]]; then
    echo "toolchain=1.$((($(date -v-$(sed 's/stable \([0-9]*\) \(.\).*/\1\2/' <<< $toolchain) +%s)/60/6
0/24-16569)/7/6))" >> $GITHUB_OUTPUT
  else
    echo "toolchain=1.$((($(date --date "${toolchain#stable }" +%s)/60/60/24-16569)/7/6))" >> $GITHUB_O
UTPUT
  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
else
  echo "toolchain=$toolchain" >> $GITHUB_OUTPUT
fi
[Test with act/build]   ⚙  ::set-output:: toolchain=
[Test with act/build] ⭐ Run Main : construct rustup command line
echo "targets=$(for t in ${targets//,/ }; do echo -n ' --target' $t; done)" >> $GITHUB_OUTPUT
echo "components=$(for c in ${components//,/ }; do echo -n ' --component' $c; done)" >> $GITHUB_OUTPUT
echo "downgrade=" >> $GITHUB_OUTPUT
[Test with act/build]   🐳  docker exec cmd=[bash --noprofile --norc -e -o pipefail /var/run/act/workfl
ow/1-composite-flags.sh] user= workdir=
[Test with act/build]   ✅  Success - Main : construct rustup command line
echo "targets=$(for t in ${targets//,/ }; do echo -n ' --target' $t; done)" >> $GITHUB_OUTPUT
echo "components=$(for c in ${components//,/ }; do echo -n ' --component' $c; done)" >> $GITHUB_OUTPUT
echo "downgrade=" >> $GITHUB_OUTPUT
[Test with act/build]   ⚙  ::set-output:: downgrade=
[Test with act/build]   ⚙  ::set-output:: targets=
[Test with act/build]   ⚙  ::set-output:: components=
[Test with act/build] ⭐ Run Main : install rustup if needed
if ! command -v rustup &> /dev/null ; then
  curl --proto '=https' --tlsv1.2 --retry 10 --retry-connrefused -fsSL "https://sh.rustup.rs" | sh -s -
- --default-toolchain none -y
  echo "${CARGO_HOME:-$HOME/.cargo}/bin" >> $GITHUB_PATH
fi
[Test with act/build]   🐳  docker exec cmd=[bash --noprofile --norc -e -o pipefail /var/run/act/workfl
ow/1-composite-2.sh] user= workdir=
[Test with act/build]   ✅  Success - Main : install rustup if needed
if ! command -v rustup &> /dev/null ; then
  curl --proto '=https' --tlsv1.2 --retry 10 --retry-connrefused -fsSL "https://sh.rustup.rs" | sh -s -
- --default-toolchain none -y
  echo "${CARGO_HOME:-$HOME/.cargo}/bin" >> $GITHUB_PATH
fi
[Test with act/build]   🐳  docker exec cmd=[bash --noprofile --norc -e -o pipefail /var/run/act/workfl
ow/1-composite-3.sh] user= workdir=
| error: error: The following required arguments were not provided:
|     <toolchain>...
| 
| USAGE:
|     rustup toolchain install <toolchain>... --no-self-update --profile <profile>
| 
| For more information try --help
| 
[Test with act/build]   ❌  Failure - Main rustup toolchain install 
[Test with act/build] exitcode '1': failure

Additional information

No response

Originally created by @doums on GitHub (Feb 2, 2023). Original GitHub issue: https://github.com/nektos/act/issues/1602 ### Bug report info ```plain text act version: 0.2.34 GOOS: linux GOARCH: amd64 NumCPU: 8 Docker host: DOCKER_HOST environment variable is unset/empty. Sockets found: /var/run/docker.sock Config files: /home/pierre/.actrc: -P ubuntu-latest=catthehacker/ubuntu:rust-latest Build info: Go version: go1.19.4 Module path: github.com/nektos/act Main version: (devel) Main path: github.com/nektos/act Main checksum: Build settings: -compiler: gc -trimpath: true CGO_ENABLED: 1 GOARCH: amd64 GOOS: linux GOAMD64: v1 Docker Engine: Engine version: 20.10.23 Engine runtime: runc Cgroup version: 2 Cgroup driver: systemd Storage driver: overlay2 Registry URI: https://index.docker.io/v1/ OS: Arch Linux OS type: linux OS version: OS arch: x86_64 OS kernel: 6.1.8-arch1-1 OS CPU: 8 OS memory: 32031 MB Security options: name=seccomp,profile=default name=cgroupns ``` ### Command used with act ```sh act -W .github/workflows/example.yml ``` ### Describe issue running `dtolnay/rust-toolchain` action should succeed ### Link to GitHub repository _No response_ ### Workflow content ```yml name: Test with act on: workflow_dispatch: jobs: build: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v3 - name: Install Rust toolchain uses: dtolnay/rust-toolchain@stable with: components: clippy ``` ### Relevant log output ```sh [Test with act/build] ⭐ Run Main : parse toolchain version if [[ $toolchain =~ ^stable' '[0-9]+' '(year|month|week|day)s?' 'ago$ ]]; then if [[ Linux == macOS ]]; then echo "toolchain=1.$((($(date -v-$(sed 's/stable \([0-9]*\) \(.\).*/\1\2/' <<< $toolchain) +%s)/60/6 0/24-16569)/7/6))" >> $GITHUB_OUTPUT else echo "toolchain=1.$((($(date --date "${toolchain#stable }" +%s)/60/60/24-16569)/7/6))" >> $GITHUB_O UTPUT 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 else echo "toolchain=$toolchain" >> $GITHUB_OUTPUT fi [Test with act/build] 🐳 docker exec cmd=[bash --noprofile --norc -e -o pipefail /var/run/act/workfl ow/1-composite-parse.sh] user= workdir= [Test with act/build] ✅ Success - Main : parse toolchain version if [[ $toolchain =~ ^stable' '[0-9]+' '(year|month|week|day)s?' 'ago$ ]]; then if [[ Linux == macOS ]]; then echo "toolchain=1.$((($(date -v-$(sed 's/stable \([0-9]*\) \(.\).*/\1\2/' <<< $toolchain) +%s)/60/6 0/24-16569)/7/6))" >> $GITHUB_OUTPUT else echo "toolchain=1.$((($(date --date "${toolchain#stable }" +%s)/60/60/24-16569)/7/6))" >> $GITHUB_O UTPUT 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 else echo "toolchain=$toolchain" >> $GITHUB_OUTPUT fi [Test with act/build] ⚙ ::set-output:: toolchain= [Test with act/build] ⭐ Run Main : construct rustup command line echo "targets=$(for t in ${targets//,/ }; do echo -n ' --target' $t; done)" >> $GITHUB_OUTPUT echo "components=$(for c in ${components//,/ }; do echo -n ' --component' $c; done)" >> $GITHUB_OUTPUT echo "downgrade=" >> $GITHUB_OUTPUT [Test with act/build] 🐳 docker exec cmd=[bash --noprofile --norc -e -o pipefail /var/run/act/workfl ow/1-composite-flags.sh] user= workdir= [Test with act/build] ✅ Success - Main : construct rustup command line echo "targets=$(for t in ${targets//,/ }; do echo -n ' --target' $t; done)" >> $GITHUB_OUTPUT echo "components=$(for c in ${components//,/ }; do echo -n ' --component' $c; done)" >> $GITHUB_OUTPUT echo "downgrade=" >> $GITHUB_OUTPUT [Test with act/build] ⚙ ::set-output:: downgrade= [Test with act/build] ⚙ ::set-output:: targets= [Test with act/build] ⚙ ::set-output:: components= [Test with act/build] ⭐ Run Main : install rustup if needed if ! command -v rustup &> /dev/null ; then curl --proto '=https' --tlsv1.2 --retry 10 --retry-connrefused -fsSL "https://sh.rustup.rs" | sh -s - - --default-toolchain none -y echo "${CARGO_HOME:-$HOME/.cargo}/bin" >> $GITHUB_PATH fi [Test with act/build] 🐳 docker exec cmd=[bash --noprofile --norc -e -o pipefail /var/run/act/workfl ow/1-composite-2.sh] user= workdir= [Test with act/build] ✅ Success - Main : install rustup if needed if ! command -v rustup &> /dev/null ; then curl --proto '=https' --tlsv1.2 --retry 10 --retry-connrefused -fsSL "https://sh.rustup.rs" | sh -s - - --default-toolchain none -y echo "${CARGO_HOME:-$HOME/.cargo}/bin" >> $GITHUB_PATH fi [Test with act/build] 🐳 docker exec cmd=[bash --noprofile --norc -e -o pipefail /var/run/act/workfl ow/1-composite-3.sh] user= workdir= | error: error: The following required arguments were not provided: | <toolchain>... | | USAGE: | rustup toolchain install <toolchain>... --no-self-update --profile <profile> | | For more information try --help | [Test with act/build] ❌ Failure - Main rustup toolchain install [Test with act/build] exitcode '1': failure ``` ### Additional information _No response_
kerem 2026-03-01 21:46:30 +03:00
  • closed this issue
  • added the
    kind/bug
    label
Author
Owner

@Terr commented on GitHub (Feb 2, 2023):

I was having the same issue but updating to the latest version of act (0.2.42) fixed it

(I think I was also running 0.2.34 btw)

<!-- gh-comment-id:1414339110 --> @Terr commented on GitHub (Feb 2, 2023): I was having the same issue but updating to the latest version of act (0.2.42) fixed it (I think I was also running 0.2.34 btw)
Author
Owner

@doums commented on GitHub (Feb 2, 2023):

Yes updating to latest fixed it for me too. Thankis @Terr for the info ;)

<!-- gh-comment-id:1414419172 --> @doums commented on GitHub (Feb 2, 2023): Yes updating to latest fixed it for me too. Thankis @Terr for the info ;)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/act#802
No description provided.