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:
parent
c48ac80f46
commit
3479bd5aaa
11 changed files with 1671 additions and 68 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue