Skip to content

Commit

Permalink
rough out the idea
Browse files Browse the repository at this point in the history
  • Loading branch information
Firehed committed Aug 18, 2023
1 parent e21d23f commit 33d1767
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 4 deletions.
13 changes: 11 additions & 2 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 17 additions & 2 deletions src/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,23 @@ export function getAllStages(): string[] {
* Takes the build stage and returns an untagged image name for it
*/
function getUntaggedImageForStage(stage: string): string {
const repo = core.getInput('repository')
return `${repo}/${stage}`
const reg = core.getInput('registry')
let repo = core.getInput('repository')

if (repo === '') {
repo = github.context.repo.owner + '/' + github.context.repo.repo
}

// Attempt to detect misconfiguration

// WIP
if (reg !== '' && repo === '') {
// throw new Error('Registry and repository must not both be bla
}



return `${reg}/${repo}/${stage}`
}

export function getTaggedImageForStage(stage: string, tag: string): string {
Expand Down

0 comments on commit 33d1767

Please sign in to comment.