Skip to content

Commit 6cb1348

Browse files
committed
Ruby: Try different workaround for Actions bug
1 parent 5332344 commit 6cb1348

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

.github/workflows/ruby-build.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -262,29 +262,28 @@ jobs:
262262
- name: Fetch CodeQL
263263
uses: ./.github/actions/fetch-codeql
264264

265-
# Due to a bug in Actions, we can't use runner.temp here.
265+
# Due to a bug in Actions, we can't use runner.temp in the run blocks here.
266266
# https://github.com/actions/runner/issues/2185
267-
- name: Ensure temp directory exists
268-
run: mkdir -p /tmp
269267

270268
- name: Download Ruby bundle
271269
uses: actions/download-artifact@v3
272270
with:
273271
name: codeql-ruby-bundle
274-
path: /tmp
272+
path: ${{ runner.temp }}
275273
- name: Unzip Ruby bundle
276274
shell: bash
277275
run: unzip -q -d /tmp/ruby-bundle /tmp/codeql-ruby-bundle.zip
276+
run: unzip -q -d "$RUNNER_TEMP"/ruby-bundle "$RUNNER_TEMP"/codeql-ruby-bundle.zip
278277

279278
- name: Run QL test
280279
shell: bash
281280
run: |
282-
codeql test run --search-path /tmp/ruby-bundle --additional-packs /tmp/ruby-bundle ruby/ql/test/library-tests/ast/constants/
281+
codeql test run --search-path "$RUNNER_TEMP"/ruby-bundle --additional-packs "$RUNNER_TEMP"/ruby-bundle ruby/ql/test/library-tests/ast/constants/
283282
- name: Create database
284283
shell: bash
285284
run: |
286-
codeql database create --search-path /tmp/ruby-bundle --language ruby --source-root ruby/ql/test/library-tests/ast/constants/ ../database
285+
codeql database create --search-path "$RUNNER_TEMP"/ruby-bundle --language ruby --source-root ruby/ql/test/library-tests/ast/constants/ ../database
287286
- name: Analyze database
288287
shell: bash
289288
run: |
290-
codeql database analyze --search-path /tmp/ruby-bundle --format=sarifv2.1.0 --output=out.sarif ../database ruby-code-scanning.qls
289+
codeql database analyze --search-path "$RUNNER_TEMP"/ruby-bundle --format=sarifv2.1.0 --output=out.sarif ../database ruby-code-scanning.qls

0 commit comments

Comments
 (0)