Skip to content

Commit d634e93

Browse files
authored
ci: replace newly-deprecated commands in actions (#1389)
* ci: replace newly-deprecated commands in actions The `set-output` command is being deprecated, and so we need to migrate. Per the guides, this looks like the easiest replacement. See #144 for more info. * fixup: whoops, replace all relevant things (not just a few) I'm getting tired I guess.
1 parent 18bfd39 commit d634e93

File tree

2 files changed

+22
-22
lines changed

2 files changed

+22
-22
lines changed

.github/actions/test_gem/action.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -33,24 +33,24 @@ runs:
3333
shell: bash
3434
run: |
3535
dir=$(find . -iname '${{ inputs.gem }}.gemspec' -exec dirname {} \;)
36-
echo "::set-output name=dir::${dir}"
36+
echo "gem_dir=${dir}" >> $GITHUB_OUTPUT
3737
3838
# We install multiple ruby versions here, and that makes for some
3939
# annoying bundler conflicts when we get to the JRuby step. Removing
4040
# the lockfile slows things down a bit, but we should still get most
4141
# of the benefits of bundler caching.
4242
rm -f "${dir}/Gemfile.lock"
4343
44-
echo "::set-output name=cache_key::mri"
44+
echo "cache_key=mri" >> $GITHUB_OUTPUT
4545
if [[ "${{ inputs.ruby }}" == "jruby" ]]; then
46-
echo "::set-output name=cache_key::jruby"
46+
echo "cache_key=jruby" >> $GITHUB_OUTPUT
4747
elif [[ "${{ inputs.ruby }}" == "truffleruby" ]]; then
48-
echo "::set-output name=cache_key::truffleruby"
48+
echo "cache_key=truffleruby" >> $GITHUB_OUTPUT
4949
fi
5050
51-
echo "::set-output name=appraisals::false"
51+
echo "appraisals=false" >> $GITHUB_OUTPUT
5252
if [[ -f "${dir}/Appraisals" ]]; then
53-
echo "::set-output name=appraisals::true"
53+
echo "appraisals=true" >> $GITHUB_OUTPUT
5454
fi
5555
5656
# Install ruby and bundle dependencies and cache!
@@ -60,7 +60,7 @@ runs:
6060
uses: ruby/setup-ruby@v1
6161
with:
6262
ruby-version: "${{ inputs.ruby }}"
63-
working-directory: "${{ steps.setup.outputs.dir }}"
63+
working-directory: "${{ steps.setup.outputs.gem_dir }}"
6464
bundler-cache: true
6565
cache-version: "v1-${{ steps.setup.outputs.cache_key }}"
6666

@@ -74,14 +74,14 @@ runs:
7474
if: "${{ steps.setup.outputs.appraisals == 'true' }}"
7575
shell: bash
7676
run: |
77-
cd "${{ steps.setup.outputs.dir }}"
77+
cd "${{ steps.setup.outputs.gem_dir }}"
7878
bundle install
7979
bundle exec appraisal install
8080
8181
- name: Test Gem
8282
shell: bash
8383
run: |
84-
cd "${{ steps.setup.outputs.dir }}"
84+
cd "${{ steps.setup.outputs.gem_dir }}"
8585
8686
if [[ -f "Appraisals" ]]; then
8787
bundle exec appraisal rake test
@@ -114,19 +114,19 @@ runs:
114114
shell: bash
115115
if: "${{ inputs.yard == 'true' }}"
116116
run: |
117-
cd "${{ steps.setup.outputs.dir }}"
117+
cd "${{ steps.setup.outputs.gem_dir }}"
118118
bundle exec rake yard
119119
120120
- name: Rubocop
121121
shell: bash
122122
if: "${{ inputs.rubocop == 'true' }}"
123123
run: |
124-
cd "${{ steps.setup.outputs.dir }}"
124+
cd "${{ steps.setup.outputs.gem_dir }}"
125125
bundle exec rake rubocop
126126
127127
- name: Build Gem
128128
shell: bash
129129
if: "${{ inputs.build == 'true' }}"
130130
run: |
131-
cd "${{ steps.setup.outputs.dir }}"
131+
cd "${{ steps.setup.outputs.gem_dir }}"
132132
gem build ${{ inputs.gem }}.gemspec

.github/workflows/ci.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -112,11 +112,11 @@ jobs:
112112
id: jruby_skip
113113
shell: bash
114114
run: |
115-
echo "::set-output name=skip::false"
116-
[[ "${{ matrix.gem }}" == "opentelemetry-exporter-otlp" ]] && echo "::set-output name=skip::true"
117-
[[ "${{ matrix.gem }}" == "opentelemetry-exporter-otlp-common" ]] && echo "::set-output name=skip::true"
118-
[[ "${{ matrix.gem }}" == "opentelemetry-exporter-otlp-http" ]] && echo "::set-output name=skip::true"
119-
[[ "${{ matrix.gem }}" == "opentelemetry-exporter-otlp-grpc" ]] && echo "::set-output name=skip::true"
115+
echo "skip=false" >> $GITHUB_OUTPUT
116+
[[ "${{ matrix.gem }}" == "opentelemetry-exporter-otlp" ]] && echo "skip=true" >> $GITHUB_OUTPUT
117+
[[ "${{ matrix.gem }}" == "opentelemetry-exporter-otlp-common" ]] && echo "skip=true" >> $GITHUB_OUTPUT
118+
[[ "${{ matrix.gem }}" == "opentelemetry-exporter-otlp-http" ]] && echo "skip=true" >> $GITHUB_OUTPUT
119+
[[ "${{ matrix.gem }}" == "opentelemetry-exporter-otlp-grpc" ]] && echo "skip=true" >> $GITHUB_OUTPUT
120120
# This is essentially a bash script getting evaluated, so we need to return true or the whole job fails.
121121
true
122122
- name: "Test JRuby"
@@ -129,11 +129,11 @@ jobs:
129129
id: truffleruby_skip
130130
shell: bash
131131
run: |
132-
echo "::set-output name=skip::false"
133-
[[ "${{ matrix.gem }}" == "opentelemetry-exporter-otlp" ]] && echo "::set-output name=skip::true"
134-
[[ "${{ matrix.gem }}" == "opentelemetry-exporter-otlp-common" ]] && echo "::set-output name=skip::true"
135-
[[ "${{ matrix.gem }}" == "opentelemetry-exporter-otlp-http" ]] && echo "::set-output name=skip::true"
136-
[[ "${{ matrix.gem }}" == "opentelemetry-exporter-otlp-grpc" ]] && echo "::set-output name=skip::true"
132+
echo "skip=false" >> $GITHUB_OUTPUT
133+
[[ "${{ matrix.gem }}" == "opentelemetry-exporter-otlp" ]] && echo "skip=true" >> $GITHUB_OUTPUT
134+
[[ "${{ matrix.gem }}" == "opentelemetry-exporter-otlp-common" ]] && echo "skip=true" >> $GITHUB_OUTPUT
135+
[[ "${{ matrix.gem }}" == "opentelemetry-exporter-otlp-http" ]] && echo "skip=true" >> $GITHUB_OUTPUT
136+
[[ "${{ matrix.gem }}" == "opentelemetry-exporter-otlp-grpc" ]] && echo "skip=true" >> $GITHUB_OUTPUT
137137
# This is essentially a bash script getting evaluated, so we need to return true or the whole job fails.
138138
true
139139
- name: "Test truffleruby"

0 commit comments

Comments
 (0)