Skip to content

Commit 5916e7a

Browse files
committed
Use Registry Credentials when passed to env
In order to allow us to pass centrally managed registry credentials, this PR implements a basic version that grabs the Base64 encoded credential blob from the environment and passes them to the Proxy.
1 parent 27e6d90 commit 5916e7a

File tree

8 files changed

+198
-177
lines changed

8 files changed

+198
-177
lines changed

__tests__/main.test.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,11 @@ describe('run', () => {
4242

4343
process.env.GITHUB_DEPENDABOT_JOB_TOKEN = 'xxx'
4444
process.env.GITHUB_DEPENDABOT_CRED_TOKEN = 'yyy'
45+
process.env.GITHUB_REGISTRIES_PROXY = Buffer.from(
46+
JSON.stringify([
47+
{type: 'npm_registry', host: 'npm.pkg.github.com', token: 'abc'}
48+
])
49+
).toString('base64')
4550

4651
markJobAsProcessedSpy = jest.spyOn(
4752
ApiClient.prototype,

dist/cleanup/index.js

Lines changed: 49 additions & 64 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/cleanup/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/cleanup/licenses.txt

Lines changed: 10 additions & 22 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)