Skip to content

Commit bc437e4

Browse files
committed
Migrate workflows from deprecated set-output commands
GitHub Actions provides the capability for workflow authors to use the capabilities of the GitHub Actions ToolKit package directly in the `run` keys of workflows via "workflow commands". One such command is `set-output`, which allows data to be passed out of a workflow step as an output. It has been determined that this command has potential to be a security risk in some applications. For this reason, GitHub has deprecated the command and a warning of this is shown in the workflow run summary page of any workflow using it: > The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more > information see: > https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/ The identical capability is now provided in a safer form via the GitHub Actions "environment files" system. Migrating the use of the deprecated workflow commands to use the `GITHUB_OUTPUT` environment file instead fixes any potential vulnerabilities in the workflows, resolves the warnings, and avoids the eventual complete breakage of the workflows that would result from GitHub's planned removal of the `set-output` workflow command.
1 parent a9195f5 commit bc437e4

6 files changed

+6
-6
lines changed

.github/workflows/check-go-dependencies-task.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ jobs:
5757
RESULT="false"
5858
fi
5959
60-
echo "::set-output name=result::$RESULT"
60+
echo "result=$RESULT" >> $GITHUB_OUTPUT
6161
6262
check-cache:
6363
needs: run-determination

.github/workflows/check-go-task.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jobs:
5151
RESULT="false"
5252
fi
5353
54-
echo "::set-output name=result::$RESULT"
54+
echo "result=$RESULT" >> $GITHUB_OUTPUT
5555
5656
check-errors:
5757
name: check-errors (${{ matrix.module.path }})

.github/workflows/check-license.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555
RESULT="false"
5656
fi
5757
58-
echo "::set-output name=result::$RESULT"
58+
echo "result=$RESULT" >> $GITHUB_OUTPUT
5959
6060
check-license:
6161
needs: run-determination

.github/workflows/check-markdown-task.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ jobs:
5959
RESULT="false"
6060
fi
6161
62-
echo "::set-output name=result::$RESULT"
62+
echo "result=$RESULT" >> $GITHUB_OUTPUT
6363
6464
lint:
6565
needs: run-determination

.github/workflows/check-yaml-task.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ jobs:
6969
RESULT="false"
7070
fi
7171
72-
echo "::set-output name=result::$RESULT"
72+
echo "result=$RESULT" >> $GITHUB_OUTPUT
7373
7474
check:
7575
name: ${{ matrix.configuration.name }}

.github/workflows/sync-labels-npm.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ jobs:
119119
run: |
120120
# Use of this flag in the github-label-sync command will cause it to only check the validity of the
121121
# configuration.
122-
echo "::set-output name=flag::--dry-run"
122+
echo "flag=--dry-run" >> $GITHUB_OUTPUT
123123
124124
- name: Checkout repository
125125
uses: actions/checkout@v4

0 commit comments

Comments
 (0)