Skip to content

Commit

Permalink
Remembering to run yarn package
Browse files Browse the repository at this point in the history
  • Loading branch information
lagren committed Jun 28, 2020
1 parent 1900f3e commit 4b39794
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ jobs:
with:
SERVICE_ACCOUNT_KEY: ${{ secrets.SERVICE_ACCOUNT_KEY }}
HOST: gcr.io
- name: debug
run: cat ~/.docker/config.json
- name: docker live test
run: |
docker pull alpine
Expand Down
9 changes: 7 additions & 2 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -969,6 +969,7 @@ const exec = __webpack_require__(986)
async function run() {
try {
const serviceAccountKey = core.getInput("SERVICE_ACCOUNT_KEY", {required: true})
const host = core.getInput('HOST', {required: true})

let myOutput = '';
let myError = '';
Expand All @@ -985,9 +986,13 @@ async function run() {
}
};

await exec.exec('docker', ['login', '-u', '_json_key', '-p', serviceAccountKey, 'https://asia.gcr.io'], options)
.catch(() => {throw {message: myError}})
const registry = 'https://' + host

console.log(`Logging into ${registry}`)

await exec.exec('docker', ['login', '-u', '_json_key', '-p', serviceAccountKey, registry], options)
.then(() => {console.log(myOutput)})
.catch(() => {throw {message: myError}})
} catch (error) {
core.setFailed(error.message)
}
Expand Down

0 comments on commit 4b39794

Please sign in to comment.