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

ci: fix GitHub_Actions set-output is deprecated #11265

Merged
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
ci: fix GitHub_Actions set-output is deprecated
  • Loading branch information
cclauss committed Nov 15, 2022
commit fc4c74590982ddac6ef1dbcbd6f979cd09275497
8 changes: 4 additions & 4 deletions scripts/github-actions/should-workflow-run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,16 @@ for bazel_target in $affected_files ; do
bazel query "$bazel_target"
done

echo "::set-output name=bazel-targets::${bazel_targets[*]}"
echo "::set-output name=run-workflow::false"
echo "{bazel-targets}=${bazel_targets[*]}" >> $GITHUB_OUTPUT
echo "{run-workflow}=false" >> $GITHUB_OUTPUT

if (( ${#bazel_targets[@]} == 0 )); then
echo "No bazel targets found after checking the diff."
exit 0
fi

if [[ " ${bazel_targets[*]} " == *"$BAZEL_TARGET_PREFIX"* ]]; then
echo "::set-output name=run-workflow::true"
echo "{run-workflow}=true" >> $GITHUB_OUTPUT
echo "Bazel targets found: ${bazel_targets[*]}"
exit 0
fi
Expand All @@ -43,7 +43,7 @@ tests=$(bazel query \
"kind(test, rdeps(//..., set(${bazel_targets[*]})))")

if [[ " ${tests[*]} " == *"$BAZEL_TARGET_PREFIX"* ]]; then
echo "::set-output name=run-workflow::true"
echo "{run-workflow}=true" >> $GITHUB_OUTPUT
echo "Test targets found: ${tests[*]}"
exit 0
fi