Skip to content

Commit 4bfbe54

Browse files
committed
use credentials
1 parent 0b7a301 commit 4bfbe54

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

.github/dependabot/go.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,12 @@ job:
1616
# looks absolute, but this is relative to the root of the repo
1717
directory: /example
1818
branch: main
19+
# credentials are optional, but are used to authenticate with private repos and registries when provided
20+
credentials:
21+
- type: git_source
22+
# Most credentials take a url or host
23+
host: github.com
24+
# Credentials will be either username/password or token
25+
username: x-access-token
26+
# Dependabot CLI will inject secrets from the environment
27+
password: $GITHUB_TOKEN

.github/workflows/example.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ jobs:
2525
2626
- name: Run Dependabot
2727
env:
28-
LOCAL_GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
28+
# GITHUB_TOKEN shows an example of how Dependabot CLI can be used with secrets.
29+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2930
run: |
3031
./dependabot update -f .github/dependabot/go.yml --timeout 20m > result.jsonl
3132

0 commit comments

Comments
 (0)