@@ -32,14 +32,14 @@ runs:
32
32
: parse toolchain version
33
33
if [[ $toolchain =~ ^stable' '[0-9]+' '(year|month|week|day)s?' 'ago$ ]]; then
34
34
if [[ ${{runner.os}} == macOS ]]; then
35
- echo "::set-output name= toolchain:: 1.$((($(date -v-$(sed 's/stable \([0-9]*\) \(.\).*/\1\2/' <<< $toolchain) +%s)/60/60/24-16569)/7/6))"
35
+ echo "toolchain= 1.$((($(date -v-$(sed 's/stable \([0-9]*\) \(.\).*/\1\2/' <<< $toolchain) +%s)/60/60/24-16569)/7/6))" >> $GITHUB_OUTPUT
36
36
else
37
- echo "::set-output name= toolchain:: 1.$((($(date --date "${toolchain#stable }" +%s)/60/60/24-16569)/7/6))"
37
+ echo "toolchain= 1.$((($(date --date "${toolchain#stable }" +%s)/60/60/24-16569)/7/6))" >> $GITHUB_OUTPUT
38
38
fi
39
39
elif [[ $toolchain =~ ^stable' 'minus' '[0-9]+' 'releases?$ ]]; then
40
- echo "::set-output name= toolchain:: 1.$((($(date +%s)/60/60/24-16569)/7/6-${toolchain//[^0-9]/}))"
40
+ echo "toolchain= 1.$((($(date +%s)/60/60/24-16569)/7/6-${toolchain//[^0-9]/}))" >> $GITHUB_OUTPUT
41
41
else
42
- echo "::set-output name= toolchain:: $toolchain"
42
+ echo "toolchain= $toolchain" >> $GITHUB_OUTPUT
43
43
fi
44
44
env :
45
45
toolchain : ${{inputs.toolchain}}
48
48
- id : flags
49
49
run : |
50
50
: construct rustup command line
51
- echo "::set-output name= targets:: $(for t in ${targets//,/ }; do echo -n ' --target' $t; done)"
52
- echo "::set-output name= components:: $(for c in ${components//,/ }; do echo -n ' --component' $c; done)"
53
- echo "::set-output name= downgrade:: ${{inputs.toolchain == 'nightly' && inputs.components && ' --allow-downgrade' || ''}}"
51
+ echo "targets= $(for t in ${targets//,/ }; do echo -n ' --target' $t; done)" >> $GITHUB_OUTPUT
52
+ echo "components= $(for c in ${components//,/ }; do echo -n ' --component' $c; done)" >> $GITHUB_OUTPUT
53
+ echo "downgrade= ${{inputs.toolchain == 'nightly' && inputs.components && ' --allow-downgrade' || ''}}" >> $GITHUB_OUTPUT
54
54
env :
55
55
targets : ${{inputs.targets || inputs.target || ''}}
56
56
components : ${{inputs.components}}
77
77
: create cachekey
78
78
DATE=$(rustc +${{steps.parse.outputs.toolchain}} --version --verbose | sed -ne 's/^commit-date: \(20[0-9][0-9]\)-\([01][0-9]\)-\([0-3][0-9]\)$/\1\2\3/p')
79
79
HASH=$(rustc +${{steps.parse.outputs.toolchain}} --version --verbose | sed -ne 's/^commit-hash: //p')
80
- echo "::set-output name= cachekey:: $(echo $DATE$HASH | head -c12)"
80
+ echo "cachekey= $(echo $DATE$HASH | head -c12)" >> $GITHUB_OUTPUT
81
81
shell : bash
82
82
83
83
- run : |
0 commit comments