Skip to content

Commit

Permalink
Auth docker pull
Browse files Browse the repository at this point in the history
  • Loading branch information
Philip Harrison committed Jul 16, 2021
1 parent 0beefbf commit 17b7260
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/updater.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ const JOB_INPUT_FILENAME = 'job.json'
const JOB_INPUT_PATH = `/home/dependabot/dependabot-updater`

const JOB_OUTPUT_PATH = '/home/dependabot/dependabot-updater/output.json'
const DEFAULT_UPDATER_IMAGE = 'dependabot/dependabot-updater:0.156.4'
const DEFAULT_UPDATER_IMAGE =
'docker.pkg.github.com/dependabot/dependabot-updater:latest'

export class Updater {
constructor(
Expand All @@ -32,7 +33,11 @@ export class Updater {
}

core.info(`Pulling image ${this.updaterImage}...`)
const stream = await this.docker.pull(this.updaterImage)
const auth = {
username: process.env.GITHUB_PKG_USER,
password: process.env.GITHUB_PKG_TOKEN
}
const stream = await this.docker.pull(this.updaterImage, {authconfig: auth})
await this.endOfStream(stream)
core.info(`Pulled image ${this.updaterImage}`)
}
Expand Down

0 comments on commit 17b7260

Please sign in to comment.