mirror of
https://github.com/docker/build-push-action.git
synced 2025-04-21 10:46:45 +00:00
Test failures fixed, added 3 new test cases
Signed-off-by: Jyotsna <Josh-01@github.com>
This commit is contained in:
parent
dd55519eee
commit
e2bf0d0cc1
3 changed files with 83 additions and 17 deletions
19
dist/index.js
generated
vendored
19
dist/index.js
generated
vendored
|
@ -12085,14 +12085,19 @@ function getInputs(defaultContext) {
|
|||
githubToken: core.getInput('github-token'),
|
||||
ssh: yield getInputList('ssh')
|
||||
};
|
||||
//Add repo as source-label if not already supplied by user
|
||||
const sourceLabelKey = 'org.opencontainers.image.source';
|
||||
if (userInputs.labels.find(val => val.startsWith(sourceLabelKey) == true) == null) {
|
||||
userInputs.labels.push(`${sourceLabelKey}=https://github.com/${github.context.repo.owner}/${github.context.repo.repo}`);
|
||||
if (userInputs.load == true ||
|
||||
userInputs.push == true ||
|
||||
userInputs.outputs.find(val => val.indexOf('type=image') > -1 || val.indexOf('type=registry') > -1)) {
|
||||
//Add repo as source-label if not already supplied by user
|
||||
const sourceLabelKey = 'org.opencontainers.image.source';
|
||||
if (userInputs.labels.find(val => val.startsWith(sourceLabelKey) == true) == null) {
|
||||
const githubOwnerRepoUrl = defaultContext.split('#')[0];
|
||||
userInputs.labels.push(`${sourceLabelKey}=${githubOwnerRepoUrl}`);
|
||||
}
|
||||
//Add dockerfile path as label
|
||||
let dockerfilePath = userInputs.file;
|
||||
userInputs.labels.push(`dockerfile-path=${dockerfilePath}`);
|
||||
}
|
||||
//Add dockerfile path as label
|
||||
let dockerfilePath = userInputs.file;
|
||||
userInputs.labels.push(`dockerfile-path=${dockerfilePath}`);
|
||||
return userInputs;
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue