2
0
Fork 0
mirror of https://code.forgejo.org/docker/metadata-action.git synced 2025-08-26 16:00:54 +00:00

Add label-custom input (#35)

Co-authored-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
CrazyMax 2020-12-23 22:09:38 +01:00 committed by GitHub
parent c48ac80f46
commit 3479bd5aaa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 1671 additions and 68 deletions

View file

@ -1,5 +1,5 @@
import * as handlebars from 'handlebars';
import * as moment from 'moment';
import moment from 'moment';
import * as semver from 'semver';
import {Inputs} from './context';
import * as core from '@actions/core';
@ -130,7 +130,7 @@ export class Meta {
}
public labels(): Array<string> {
return [
let labels: Array<string> = [
`org.opencontainers.image.title=${this.repo.name || ''}`,
`org.opencontainers.image.description=${this.repo.description || ''}`,
`org.opencontainers.image.url=${this.repo.html_url || ''}`,
@ -140,5 +140,7 @@ export class Meta {
`org.opencontainers.image.revision=${this.context.sha || ''}`,
`org.opencontainers.image.licenses=${this.repo.license?.spdx_id || ''}`
];
labels.push(...this.inputs.labelCustom);
return labels;
}
}