Replace deprecated command with environment file by jongwooo · Pull Request #368 · nginx/nginx-prometheus-exporter (original) (raw)
Proposed changes
Resolve #367
Update workflows 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 files that use set-output
command through the following command:
$ find . -name '.yml' -o -name '.yaml' | xargs egrep '\bset-output\b'
AS-IS
echo "::set-output name=go_path::$(go env GOPATH)"
run: echo "::set-output name=go_version::$(grep "go 1." go.mod | cut -d " " -f 2)")
TO-BE
echo "go_path=$(go env GOPATH)" >> $GITHUB_OUTPUT
run: echo "go_version=$(grep "go 1." go.mod | cut -d " " -f 2)" >> $GITHUB_OUTPUT)
Checklist
Before creating a PR, run through this checklist and mark each as complete.
- I have read the CONTRIBUTING guide
- I have proven my fix is effective or that my feature works
- I have checked that all unit tests pass after adding my changes
- I have ensured the README is up to date
- I have rebased my branch onto main
- I will ensure my PR is targeting the main branch and pulling from my branch on my own fork