mirror of
https://github.com/docker/build-push-action.git
synced 2025-04-20 10:26:44 +00:00
Added dockerfile path to image label
Signed-off-by: Jyotsna Singh <Josh-01@github.com>
This commit is contained in:
parent
6efc2b01cb
commit
720cd8569f
2 changed files with 11 additions and 0 deletions
4
dist/index.js
generated
vendored
4
dist/index.js
generated
vendored
|
@ -2373,6 +2373,7 @@ const context = __importStar(__webpack_require__(842));
|
|||
const exec = __importStar(__webpack_require__(757));
|
||||
const stateHelper = __importStar(__webpack_require__(647));
|
||||
const core = __importStar(__webpack_require__(186));
|
||||
const github = __importStar(__webpack_require__(438));
|
||||
function run() {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
try {
|
||||
|
@ -2387,6 +2388,9 @@ function run() {
|
|||
core.info(`📣 Buildx version: ${buildxVersion}`);
|
||||
const defContext = context.defaultContext();
|
||||
let inputs = yield context.getInputs(defContext);
|
||||
//Add dockerfile path to label
|
||||
let dockerfilePath = core.getInput('file') || 'Dockerfile';
|
||||
inputs.labels.push(`org.opencontainers.image.source=https://github.com/${github.context.repo.owner}/${github.context.repo.repo}/${dockerfilePath}`);
|
||||
core.info(`🏃 Starting build...`);
|
||||
const args = yield context.getArgs(inputs, defContext, buildxVersion);
|
||||
yield exec.exec('docker', args).then(res => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue