Skip to content

Commit

Permalink
ci: migrate from set-output to GITHUB_OUTPUT (#2625)
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
jpsim authored Oct 27, 2022
1 parent 6352e79 commit d9a79bb
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 22 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/android_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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'
Expand Down Expand Up @@ -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'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/asan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/ios_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/python_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/submodule_update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tsan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
4 changes: 2 additions & 2 deletions tools/bump_lyft_support_rotation.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"

0 comments on commit d9a79bb

Please sign in to comment.