Skip to content

Commit 1e8ee3c

Browse files
committed
fix local not working by keeping the checkout clean
1 parent 69c17a6 commit 1e8ee3c

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

.github/workflows/example.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ jobs:
1313
# Checkout code to get the Dependabot CLI input file
1414
- name: Checkout code
1515
uses: actions/checkout@v4
16+
# Checkout to a directory to keep the working dir clean for the update.
17+
with:
18+
path: repo
1619

1720
- name: Download CLI
1821
env:
@@ -30,12 +33,15 @@ jobs:
3033
run: |
3134
# Run Dependabot CLI with options:
3235
# -f: the path to the job input
36+
# --local: use the locally checked out code instead of cloning each time
3337
# --timeout: the maximum time to wait for a job to finish
3438
./dependabot update \
35-
-f .github/dependabot/go.yml \
39+
-f repo/.github/dependabot/go.yml \
40+
--local repo \
3641
--timeout 20m >> result.jsonl || true
3742
./dependabot update \
38-
-f .github/dependabot/bundler.yml \
43+
-f repo/.github/dependabot/bundler.yml \
44+
--local repo \
3945
--timeout 20m >> result.jsonl || true
4046
4147
- name: Upload result

0 commit comments

Comments
 (0)