Skip to content

Commit da4c460

Browse files
committed
Use the correct action input parameter
1 parent c73d8a6 commit da4c460

File tree

2 files changed

+35
-6
lines changed

2 files changed

+35
-6
lines changed

.github/workflows/__with-checkout-path.yml

+18-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pr-checks/checks/with-checkout-path.yml

+17-3
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,43 @@
11
name: "Use a custom `checkout_path`"
22
description: "Checks that a custom `checkout_path` will find the proper commit_oid"
33
steps:
4+
# This ensures we don't accidentally use the original checkout for any part of the test.
5+
- name: Delete original checkout
6+
shell: bash
7+
run: |
8+
# delete the original checkout so we don't accidentally use it.
9+
# Actions does not support deleting the current working directory, so we
10+
# delete the contents of the directory instead.
11+
rm -rf ./* .github .git
412
# Check out the actions repo again, but at a different location.
513
# choose an arbitrary SHA so that we can later test that the commit_oid is not from main
614
- uses: actions/checkout@v4
715
with:
816
ref: 474bbf07f9247ffe1856c6a0f94aeeb10e7afee6
917
path: x/y/z/some-path
18+
1019
- uses: ./../action/init
1120
with:
1221
tools: ${{ steps.prepare-test.outputs.tools-url }}
1322
# it's enough to test one compiled language and one interpreted language
1423
languages: csharp,javascript
15-
source-path: x/y/z/some-path/tests/multi-language-repo
24+
source-root: x/y/z/some-path/tests/multi-language-repo
1625
debug: true
26+
1727
- name: Build code (non-windows)
1828
shell: bash
1929
if: ${{ runner.os != 'Windows' }}
30+
working-directory: x/y/z/some-path/tests/multi-language-repo
2031
run: |
21-
$CODEQL_RUNNER x/y/z/some-path/tests/multi-language-repo/build.sh
32+
$CODEQL_RUNNER ./build.sh
33+
2234
- name: Build code (windows)
2335
shell: bash
2436
if: ${{ runner.os == 'Windows' }}
37+
working-directory: x/y/z/some-path/tests/multi-language-repo
2538
run: |
26-
x/y/z/some-path/tests/multi-language-repo/build.sh
39+
./build.sh
40+
2741
- uses: ./../action/analyze
2842
with:
2943
checkout_path: x/y/z/some-path/tests/multi-language-repo

0 commit comments

Comments
 (0)