From d9a79bb8cb3ed668d1e1c40a695563846cd8183b Mon Sep 17 00:00:00 2001 From: JP Simard Date: Thu, 27 Oct 2022 10:37:44 -0400 Subject: [PATCH] ci: migrate from set-output to GITHUB_OUTPUT (#2625) The former is deprecated and will stop working soon: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/ Signed-off-by: JP Simard --- .github/workflows/android_tests.yml | 12 ++++++------ .github/workflows/asan.yml | 4 ++-- .github/workflows/coverage.yml | 4 ++-- .github/workflows/ios_tests.yml | 8 ++++---- .github/workflows/python_tests.yml | 4 ++-- .github/workflows/submodule_update.yml | 4 ++-- .github/workflows/tsan.yml | 4 ++-- tools/bump_lyft_support_rotation.sh | 4 ++-- 8 files changed, 22 insertions(+), 22 deletions(-) diff --git a/.github/workflows/android_tests.yml b/.github/workflows/android_tests.yml index 61bf5a8d21..d890e4e1c8 100644 --- a/.github/workflows/android_tests.yml +++ b/.github/workflows/android_tests.yml @@ -22,10 +22,10 @@ jobs: run: | if git rev-parse --abbrev-ref HEAD | grep -q ^main$ || git diff --name-only origin/main | grep -qe common/ -e java/ -e kotlin/ -e bazel/ -e ^\.bazelrc$ -e ^envoy$ -e ^WORKSPACE$ -e ^.github/workflows/android_tests.yml$ ; then echo "Tests will run." - echo "::set-output name=run_tests::true" + echo "run_tests=true" >> $GITHUB_OUTPUT else echo "Skipping tests." - echo "::set-output name=run_tests::false" + echo "run_tests=false" >> $GITHUB_OUTPUT fi - name: 'Java setup' if: steps.check_context.outputs.run_tests == 'true' @@ -61,10 +61,10 @@ jobs: run: | if git rev-parse --abbrev-ref HEAD | grep -q ^main$ || git diff --name-only origin/main | grep -qe common/ -e java/ -e kotlin/ -e bazel/ -e ^\.bazelrc$ -e ^envoy$ -e ^WORKSPACE$ -e ^.github/workflows/android_tests.yml$ ; then echo "Tests will run." - echo "::set-output name=run_tests::true" + echo "run_tests=true" >> $GITHUB_OUTPUT else echo "Skipping tests." - echo "::set-output name=run_tests::false" + echo "run_tests=false" >> $GITHUB_OUTPUT fi - name: 'Java setup' if: steps.check_context.outputs.run_tests == 'true' @@ -110,10 +110,10 @@ jobs: run: | if git rev-parse --abbrev-ref HEAD | grep -q ^main$ || git diff --name-only origin/main | grep -qe common/ -e java/ -e kotlin/ -e bazel/ -e ^\.bazelrc$ -e ^envoy$ -e ^WORKSPACE$ -e ^.github/workflows/android_tests.yml$ ; then echo "Tests will run." - echo "::set-output name=run_tests::true" + echo "run_tests=true" >> $GITHUB_OUTPUT else echo "Skipping tests." - echo "::set-output name=run_tests::false" + echo "run_tests=false" >> $GITHUB_OUTPUT fi - name: 'Java setup' if: steps.check_context.outputs.run_tests == 'true' diff --git a/.github/workflows/asan.yml b/.github/workflows/asan.yml index cef3a6fa2d..ace378370b 100644 --- a/.github/workflows/asan.yml +++ b/.github/workflows/asan.yml @@ -27,10 +27,10 @@ jobs: run: | if git rev-parse --abbrev-ref HEAD | grep -q ^main$ || git diff --name-only origin/main | grep -qe common/ -e bazel/ -e ^\.bazelrc$ -e ^envoy$ -e ^WORKSPACE$ -e ^.github/workflows/asan.yml$ ; then echo "Tests will run." - echo "::set-output name=run_tests::true" + echo "run_tests=true" >> $GITHUB_OUTPUT else echo "Skipping tests." - echo "::set-output name=run_tests::false" + echo "run_tests=false" >> $GITHUB_OUTPUT fi - uses: actions/setup-java@v1 if: steps.check-cache.outputs.cache-hit != 'true' diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 94a957a1f3..00828f7c0e 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -27,10 +27,10 @@ jobs: run: | if git rev-parse --abbrev-ref HEAD | grep -q ^main$ || git diff --name-only origin/main | grep -qe common/ -e ^.github/workflows/coverage.yml ; then echo "Coverage will run." - echo "::set-output name=run_coverage::true" + echo "run_coverage=true" >> $GITHUB_OUTPUT else echo "Skipping coverage." - echo "::set-output name=run_coverage::false" + echo "run_coverage=false" >> $GITHUB_OUTPUT fi - name: 'Run coverage' if: steps.check_context.outputs.run_coverage == 'true' diff --git a/.github/workflows/ios_tests.yml b/.github/workflows/ios_tests.yml index e607d9f3ce..725a0917e2 100644 --- a/.github/workflows/ios_tests.yml +++ b/.github/workflows/ios_tests.yml @@ -20,10 +20,10 @@ jobs: run: | if git rev-parse --abbrev-ref HEAD | grep -q ^main$ || git diff --name-only origin/main | grep -qe common/ -e objective-c/ -e swift/ -e bazel/ -e ^\.bazelrc$ -e ^envoy$ -e ^WORKSPACE$ -e ^.github/workflows/ios_tests.yml$ ; then echo "Tests will run." - echo "::set-output name=run_tests::true" + echo "run_tests=true" >> $GITHUB_OUTPUT else echo "Skipping tests." - echo "::set-output name=run_tests::false" + echo "run_tests=false" >> $GITHUB_OUTPUT fi - name: 'Install dependencies' run: ./ci/mac_ci_setup.sh @@ -53,10 +53,10 @@ jobs: run: | if git rev-parse --abbrev-ref HEAD | grep -q ^main$ || git diff --name-only origin/main | grep -qe common/ -e objective-c/ -e swift/ -e bazel/ -e ^\.bazelrc$ -e ^envoy$ -e ^WORKSPACE$ -e ^.github/workflows/ios_tests.yml$ ; then echo "Tests will run." - echo "::set-output name=run_tests::true" + echo "run_tests=true" >> $GITHUB_OUTPUT else echo "Skipping tests." - echo "::set-output name=run_tests::false" + echo "run_tests=false" >> $GITHUB_OUTPUT fi - name: 'Install dependencies' run: ./ci/mac_ci_setup.sh diff --git a/.github/workflows/python_tests.yml b/.github/workflows/python_tests.yml index f149421a87..2d78925ff0 100644 --- a/.github/workflows/python_tests.yml +++ b/.github/workflows/python_tests.yml @@ -24,10 +24,10 @@ jobs: run: | if git rev-parse --abbrev-ref HEAD | grep -q ^main$ || git diff --name-only origin/main | grep -qe common/ -e cc/ -e python/ -e bazel/ -e ^\.bazelrc$ -e ^envoy$ -e ^WORKSPACE$ -e ^.github/workflows/python_tests.yml$ ; then echo "Tests will run." - echo "::set-output name=run_tests::true" + echo "run_tests=true" >> $GITHUB_OUTPUT else echo "Skipping tests." - echo "::set-output name=run_tests::false" + echo "run_tests=false" >> $GITHUB_OUTPUT fi - name: 'Run tests' if: steps.check_context.outputs.run_tests == 'true' diff --git a/.github/workflows/submodule_update.yml b/.github/workflows/submodule_update.yml index b218a40e24..821ea04c9f 100644 --- a/.github/workflows/submodule_update.yml +++ b/.github/workflows/submodule_update.yml @@ -22,7 +22,7 @@ jobs: run: | if ! git diff-index --quiet HEAD --; then echo "Detected changes..." - echo "::set-output name=dirty::true" + echo "dirty=true" >> $GITHUB_OUTPUT fi - name: Get current support maintainer if: steps.state.outputs.dirty == 'true' @@ -31,7 +31,7 @@ jobs: maintainers_file=".github/lyft_maintainers.yml" first_line="$(head -n 1 "$maintainers_file")" current=${first_line#"current: "} - echo "::set-output name=maintainer::$current" + echo "maintainer=$current" >> $GITHUB_OUTPUT - name: Create PR if: steps.state.outputs.dirty == 'true' uses: peter-evans/create-pull-request@923ad837f191474af6b1721408744feb989a4c27 diff --git a/.github/workflows/tsan.yml b/.github/workflows/tsan.yml index da6057db98..f0694da77f 100644 --- a/.github/workflows/tsan.yml +++ b/.github/workflows/tsan.yml @@ -27,10 +27,10 @@ jobs: run: | if git rev-parse --abbrev-ref HEAD | grep -q ^main$ || git diff --name-only origin/main | grep -qe common/ -e bazel/ -e ^\.bazelrc$ -e ^envoy$ -e ^WORKSPACE$ -e ^.github/workflows/tsan.yml$ ; then echo "Tests will run." - echo "::set-output name=run_tests::true" + echo "run_tests=true" >> $GITHUB_OUTPUT else echo "Skipping tests." - echo "::set-output name=run_tests::false" + echo "run_tests=false" >> $GITHUB_OUTPUT fi - uses: actions/setup-java@v1 if: steps.check-cache.outputs.cache-hit != 'true' diff --git a/tools/bump_lyft_support_rotation.sh b/tools/bump_lyft_support_rotation.sh index a732dcfbc6..1b79902750 100755 --- a/tools/bump_lyft_support_rotation.sh +++ b/tools/bump_lyft_support_rotation.sh @@ -48,7 +48,7 @@ previous=${first_line#"current: "} next="$(next_maintainer "$previous" "$maintainers_file")" set_maintainer "$next" "$maintainers_file" -echo "::set-output name=PREVIOUS_MAINTAINER::$previous" -echo "::set-output name=NEXT_MAINTAINER::$next" +echo "PREVIOUS_MAINTAINER=$previous" >> $GITHUB_OUTPUT +echo "NEXT_MAINTAINER=$next" >> $GITHUB_OUTPUT echo "Lyft support maintainer changing from $previous to $next"