Skip to content
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

Replace set-output commands with GITHUB_OUTPUT environment vars #2192

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,22 +26,22 @@ jobs:
run: |
version_dev="dev$(date --utc +'%Y%m%d')"
echo "Development version \"${version_dev}\""
echo "::set-output name=version_dev::${version_dev}"
echo "version_dev=${version_dev}" >> $GITHUB_OUTPUT
- name: Generate Development build version for PR
if: ${{ github.event.pull_request }}
shell: bash
id: version_pr
run: |
version_pr=$(printf "%05d" ${{ github.event.pull_request.number }})
echo "Development build for PR #${{ github.event.pull_request.number }}"
echo "::set-output name=version_pr::${version_pr}"
echo "version_pr=${version_pr}" >> $GITHUB_OUTPUT
- uses: actions/checkout@v3
- name: Get Major/Minor version
id: version_main
run: |
major=$(cat ${GITHUB_WORKSPACE}/buildroot-external/meta | grep VERSION_MAJOR | cut -d'=' -f2)
build=$(cat ${GITHUB_WORKSPACE}/buildroot-external/meta | grep VERSION_BUILD | cut -d'=' -f2)
echo "::set-output name=version_main::${major}.${build}"
echo "version_main=${major}.${build}" >> $GITHUB_OUTPUT
- name: Create build matrix
uses: actions/github-script@v6
id: generate_matrix
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,11 @@ jobs:
exit 1
fi
if [ "" != "${tag_dev}" ]; then
echo "Note: Release build with custom dev part: ${tag_dev}."
echo "::set-output name=version::${major}.${build}.${tag_dev}"
echo "version=${major}.${build}.${tag_dev}" >> $GITHUB_OUTPUT
else
echo "::set-output name=version::${major}.${build}"
echo "version=${major}.${build}" >> $GITHUB_OUTPUT
fi
echo "::set-output name=version_dev::${tag_dev}"
echo "version_dev=${tag_dev}" >> $GITHUB_OUTPUT
- name: Create build matrix
uses: actions/github-script@v6
id: generate_matrix
Expand Down