Skip to content

dev: replace deprecated command with environment file #3558

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 3, 2023
Merged

dev: replace deprecated command with environment file #3558

merged 1 commit into from
Feb 3, 2023

Conversation

jongwooo
Copy link
Contributor

@jongwooo jongwooo commented Feb 3, 2023

Signed-off-by: jongwooo jongwooo.han@gmail.com

Description

Resolve #3557

Update tag.yml to use environment file instead of deprecated set-output command.
For more information, see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/

I found the workflow file that use set-output command through the following command:

$ find .github/workflows -name '*.yml' | xargs egrep '\bset-output\b'

AS-IS

echo ::set-output name=tag_name::${TAG}
echo ::set-output name=major_tag::${MAJOR}
echo ::set-output name=short_commit::${SHORT_COMMIT}
echo ::set-output name=date::${DATE}
if [[ ${{ matrix.target.Dockerfile }} == *"alpine"* ]]; then
  echo ::set-output name=full_tag_name::${TAG}-alpine
  echo ::set-output name=full_major_tag::${MAJOR}-alpine
  echo ::set-output name=latest_tag::latest-alpine
else
  echo ::set-output name=full_tag_name::${TAG}
  echo ::set-output name=full_major_tag::${MAJOR}
  echo ::set-output name=latest_tag::latest
fi

TO-BE

echo tag_name=${TAG} >> $GITHUB_OUTPUT
echo major_tag=${MAJOR} >> $GITHUB_OUTPUT
echo short_commit=${SHORT_COMMIT} >> $GITHUB_OUTPUT
echo date=${DATE} >> $GITHUB_OUTPUT
if [[ ${{ matrix.target.Dockerfile }} == *"alpine"* ]]; then
  echo full_tag_name=${TAG}-alpine >> $GITHUB_OUTPUT
  echo full_major_tag=${MAJOR}-alpine >> $GITHUB_OUTPUT
  echo latest_tag=latest-alpine >> $GITHUB_OUTPUT
 else
  echo full_tag_name=${TAG} >> $GITHUB_OUTPUT
  echo full_major_tag=${MAJOR} >> $GITHUB_OUTPUT
  echo latest_tag=latest >> $GITHUB_OUTPUT
fi

@boring-cyborg
Copy link

boring-cyborg bot commented Feb 3, 2023

Hey, thank you for opening your first Pull Request !

@CLAassistant
Copy link

CLAassistant commented Feb 3, 2023

CLA assistant check
All committers have signed the CLA.

Signed-off-by: jongwooo <jongwooo.han@gmail.com>
@ldez ldez added the area: ci PR that update CI label Feb 3, 2023
@ldez ldez self-requested a review February 3, 2023 21:34
@ldez ldez changed the title Replace deprecated command with environment file dev: replace deprecated command with environment file Feb 3, 2023
Copy link
Member

@ldez ldez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ldez ldez added the enhancement New feature or improvement label Feb 3, 2023
@ldez ldez merged commit 6d69ba1 into golangci:master Feb 3, 2023
@jongwooo jongwooo deleted the chore/replace-deprecated-command-with-environment-file branch February 3, 2023 23:59
SeigeC pushed a commit to SeigeC/golangci-lint that referenced this pull request Apr 4, 2023
@ldez ldez added this to the v1.51 milestone Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: ci PR that update CI enhancement New feature or improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Replace deprecated set-output command with environment file
3 participants