Skip to content

Commit 370ecde

Browse files
authored
Use GITHUB_OUTPUT instead of set-output in github workflows (#1007)
1 parent 68ed23f commit 370ecde

4 files changed

Lines changed: 13 additions & 12 deletions

File tree

.github/actions/get-branch/action.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ runs:
2525
env:
2626
HEAD_REF: ${{ github.head_ref || github.ref }}
2727
run: |
28-
echo "##[set-output name=branch_name;]$(echo ${HEAD_REF#refs/heads/} | tr / -)"
29-
echo "##[set-output name=branch_appname;]$(printf ${HEAD_REF#refs/heads/} \
30-
| tr / - | tr '[:upper:]' '[:lower:]' | tr -c '[a-z0-9-.]' '-')"
31-
echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
28+
echo "branch_name=$(echo ${HEAD_REF#refs/heads/} | tr / -)" >> $GITHUB_OUTPUT
29+
echo "branch_appname=$(printf ${HEAD_REF#refs/heads/} \
30+
| tr / - | tr '[:upper:]' '[:lower:]' | tr -c '[a-z0-9-.]' '-')" >> $GITHUB_OUTPUT
31+
echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT

.github/workflows/build-send-postsync-hook-runtime-image.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ jobs:
2929
id: vars
3030
shell: bash
3131
run: |
32-
echo "##[set-output name=branch;]$(echo ${GITHUB_REF##*/})"
33-
echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
32+
echo "branch=${GITHUB_REF##*/}" >> $GITHUB_OUTPUT
33+
echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
3434
3535
- name: Install rust toolchain
3636
uses: actions-rs/toolchain@v1

.github/workflows/check-excluded-packages.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,15 +50,16 @@ jobs:
5050
packages="${packages//$'\n'/'%0A'}"
5151
targets="${targets//$'\n'/'%0A'}"
5252
53-
echo "::set-output name=packages::$packages"
54-
echo "::set-output name=targets::$targets"
53+
echo "packages=$packages" >> $GITHUB_OUTPUT
54+
echo "targets=$targets" >> $GITHUB_OUTPUT
5555
5656
- name: Check excluded packages
5757
env:
5858
RUSTC_WRAPPER: ""
5959
RUSTC_WORKSPACE_WRAPPER: sccache
6060
run: |
6161
packages="${{ steps.format_output.outputs.packages }}"
62+
packages="${packages//'%0A'/$'\n'}"
6263
for p in ${packages[@]}
6364
do
6465
# skip checking the contracts for now

.github/workflows/e2e-tests-main-devnet.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -641,8 +641,8 @@ jobs:
641641
id: vars
642642
shell: bash
643643
run: |
644-
echo "##[set-output name=branch;]$(echo ${GITHUB_REF##*/})"
645-
echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
644+
echo "branch=${GITHUB_REF##*/}" >> $GITHUB_OUTPUT
645+
echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
646646
647647
- name: Push aleph-node Current Image to Public ECR
648648
env:
@@ -729,9 +729,9 @@ jobs:
729729
run: |
730730
if [ ! $(git diff HEAD origin/main -- bin/runtime/src/lib.rs | grep ' spec_version: ') ]
731731
then
732-
echo "::set-output name=diff::0"
732+
echo "diff=0" >> $GITHUB_OUTPUT
733733
else
734-
echo "::set-output name=diff::1"
734+
echo "diff=1" >> $GITHUB_OUTPUT
735735
fi
736736
737737
build-new-runtime-and-try_runtime:

0 commit comments

Comments
 (0)