Skip to content

Commit

Permalink
fix: use GITHUB_OUTPUT instead of deprecated set-output command (#1066)
Browse files Browse the repository at this point in the history
  • Loading branch information
suzuki-shunsuke and Ian Lewis authored Oct 21, 2022
1 parent b9d6adb commit a357a77
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ jobs:
run: |
set -euo pipefail
echo "::set-output name=version::-X main.gitVersion=v1.2.3"
echo "::set-output name=commit::-X main.gitCommit=abcdef"
echo "::set-output name=branch::-X main.gitBranch=main"
echo "version=-X main.gitVersion=v1.2.3" >> "$GITHUB_OUTPUT"
echo "commit=-X main.gitCommit=abcdef" >> "$GITHUB_OUTPUT"
echo "branch=-X main.gitBranch=main" >> "$GITHUB_OUTPUT"
build:
needs: [args]
Expand Down
8 changes: 4 additions & 4 deletions internal/builders/go/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,10 +165,10 @@ jobs:
fetch-depth: 0
- id: ldflags
run: |
echo "::set-output name=commit-date::$(git log --date=iso8601-strict -1 --pretty=%ct)"
echo "::set-output name=commit::$GITHUB_SHA"
echo "::set-output name=version::$(git describe --tags --always --dirty | cut -c2-)"
echo "::set-output name=tree-state::$(if git diff --quiet; then echo "clean"; else echo "dirty"; fi)"
echo "commit-date=$(git log --date=iso8601-strict -1 --pretty=%ct)" >> "$GITHUB_OUTPUT"
echo "commit=$GITHUB_SHA" >> "$GITHUB_OUTPUT"
echo "version=$(git describe --tags --always --dirty | cut -c2-)" >> "$GITHUB_OUTPUT"
echo "tree-state=$(if git diff --quiet; then echo "clean"; else echo "dirty"; fi)" >> "$GITHUB_OUTPUT"
# Trusted builder.
build:
Expand Down

0 comments on commit a357a77

Please sign in to comment.