mirror of
https://code.forgejo.org/docker/metadata-action.git
synced 2025-09-17 02:06:56 +00:00
Set latest tag only if matches with a pattern
This commit is contained in:
parent
4d7603f754
commit
0dac4059e9
6 changed files with 207 additions and 3 deletions
|
@ -68,6 +68,11 @@ export class Meta {
|
|||
version.version = `pr-${this.context.ref.replace(/^refs\/pull\//g, '').replace(/\/merge$/g, '')}`;
|
||||
}
|
||||
|
||||
if (this.inputs.tagLatestMatch) {
|
||||
const match = version.version?.match(new RegExp(this.inputs.tagLatestMatch));
|
||||
version.latest = match !== null;
|
||||
}
|
||||
|
||||
return version;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue