mirror of
https://github.com/docker/metadata-action.git
synced 2025-07-05 09:48:24 +02:00
global expressions support for labels and annotations
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
This commit is contained in:
@ -372,7 +372,7 @@ export class Meta {
|
||||
return val;
|
||||
}
|
||||
|
||||
private setGlobalExp(val): string {
|
||||
private setGlobalExp(val: string): string {
|
||||
const context = this.context;
|
||||
const currentDate = this.date;
|
||||
const commitDate = this.context.commitDate;
|
||||
@ -517,7 +517,9 @@ export class Meta {
|
||||
`org.opencontainers.image.revision=${this.context.sha || ''}`,
|
||||
`org.opencontainers.image.licenses=${this.repo.license?.spdx_id || ''}`
|
||||
];
|
||||
res.push(...extra);
|
||||
extra.forEach(label => {
|
||||
res.push(this.setGlobalExp(label));
|
||||
});
|
||||
|
||||
return Array.from(
|
||||
new Map<string, string>(
|
||||
|
Reference in New Issue
Block a user