Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 315d790

Browse files
fix: Port from set-output to environment files
GitHub deprecated the set-output command, and recommends using the new environment files instead for security purposes.
1 parent 2780e02 commit 315d790

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

‎.github/workflows/test_action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
run: |
1919
COMMIT_ID="$(git rev-parse "${{ github.head_ref }}")"
2020
echo "The sha of the starting commit is $COMMIT_ID"
21-
echo "::set-output name=commit::$COMMIT_ID"
21+
echo "SHA=$COMMIT_ID" >>"$GITHUB_OUTPUT"
2222
- name: create test commit
2323
run: |
2424
touch test_file
@@ -43,7 +43,7 @@ jobs:
4343
cd new_head
4444
last_pushed_commit="$(git rev-parse "${{ github.head_ref }}")"
4545
echo "Commit sha on origin: $last_pushed_commit"
46-
if [[ $last_pushed_commit != ${{ steps.capture.outputs.commit }} ]]; then
46+
if [[ $last_pushed_commit != ${{ steps.capture.outputs.SHA }} ]]; then
4747
echo "Something got pushed to ${{ github.head_ref }}"
4848
exit 1
4949
fi

‎entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ if [[ $REV == "$PREV_REV" ]]; then
6565
INPUT_PUSH='false'
6666
fi
6767
echo "REVISION=${REV}" >>"$GITHUB_ENV"
68-
echo "::set-output name=version::${REV}"
68+
echo "version=${REV}">>"$GITHUB_OUTPUT"
6969

7070
CURRENT_BRANCH="$(git branch --show-current)"
7171
INPUT_BRANCH="${INPUT_BRANCH:-$CURRENT_BRANCH}"

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /