Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
satackey committed Jun 16, 2020
1 parent 65ac596 commit 0d60d22
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/ImageDetector.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import exec from 'actions-exec-listener'
import * as core from '@actions/core'

export class ImageDetector {
alreadyExistedImages: Set<string> = new Set([])
Expand All @@ -11,6 +12,7 @@ export class ImageDetector {
const ids = (await exec.exec(`docker image ls -q`, [], { silent: true })).stdoutStr.split(`\n`).filter(id => id !== ``)
const repotags = (await exec.exec(`sh -c "docker image ls --all --format '{{ .Repository }}:{{ .Tag }}'"`, [], { silent: false })).stdoutStr.split(`\n`).filter(id => id !== `` || !id.includes(`<node>`));
([...ids, ...repotags]).forEach(image => this.existingImages.add(image))
core.debug(JSON.stringify({ existingImages: this.existingImages }))
return Array.from(this.existingImages)
}

Expand Down

0 comments on commit 0d60d22

Please sign in to comment.