Skip to content

Commit 36af123

Browse files
committed
ci: fix empty RELEASE_FLAG causing incorrect arg parsing
When RELEASE_FLAG env var was empty, bash treated it as an empty string argument rather than removing it, shifting the positional args. Inline the GitHub Actions expression instead.
1 parent a57b168 commit 36af123

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

.github/workflows/build-gems.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,7 @@ jobs:
5757
with:
5858
ruby-version: "4.0"
5959
bundler-cache: true
60-
- run: ./bin/test-gem-build ${RELEASE_FLAG} gems ruby
61-
env:
62-
RELEASE_FLAG: ${{ inputs.release && '--release' || '' }}
60+
- run: ./bin/test-gem-build ${{ inputs.release && '--release' || '' }} gems ruby
6361
- uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
6462
with:
6563
name: "${{ inputs.artifact_prefix }}source-gem"
@@ -97,10 +95,9 @@ jobs:
9795
- run: |
9896
docker run --rm -v $PWD:/work -w /work \
9997
ghcr.io/rake-compiler/rake-compiler-dock-image:${RCD_IMAGE_VERSION}-mri-${{ matrix.platform }} \
100-
./bin/test-gem-build ${RELEASE_FLAG} gems ${{ matrix.platform }}
98+
./bin/test-gem-build ${{ inputs.release && '--release' || '' }} gems ${{ matrix.platform }}
10199
env:
102100
RCD_IMAGE_VERSION: ${{ needs.native_setup.outputs.rcd_image_version }}
103-
RELEASE_FLAG: ${{ inputs.release && '--release' || '' }}
104101
- uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
105102
with:
106103
name: "${{ inputs.artifact_prefix }}cruby-${{ matrix.platform }}-gem"

0 commit comments

Comments
 (0)