mirror of
https://github.com/docker/metadata-action.git
synced 2024-12-22 18:35:40 +00:00
Remove duplicated tags
This commit is contained in:
parent
8adbcfe00d
commit
a017e545d7
|
@ -683,6 +683,34 @@ describe('push tag', () => {
|
|||
"org.opencontainers.image.licenses=MIT"
|
||||
]
|
||||
],
|
||||
[
|
||||
'event_tag_v1.1.1.env',
|
||||
{
|
||||
images: ['org/app', 'ghcr.io/user/app'],
|
||||
tagSemver: ['{{version}}', '{{major}}.{{minor}}.{{patch}}'],
|
||||
} as Inputs,
|
||||
{
|
||||
main: '1.1.1',
|
||||
partial: [],
|
||||
latest: true
|
||||
} as Version,
|
||||
[
|
||||
'org/app:1.1.1',
|
||||
'org/app:latest',
|
||||
'ghcr.io/user/app:1.1.1',
|
||||
'ghcr.io/user/app:latest'
|
||||
],
|
||||
[
|
||||
"org.opencontainers.image.title=Hello-World",
|
||||
"org.opencontainers.image.description=This your first repo!",
|
||||
"org.opencontainers.image.url=https://github.com/octocat/Hello-World",
|
||||
"org.opencontainers.image.source=https://github.com/octocat/Hello-World",
|
||||
"org.opencontainers.image.version=1.1.1",
|
||||
"org.opencontainers.image.created=2020-01-10T00:30:00.000Z",
|
||||
"org.opencontainers.image.revision=90dd6032fac8bda1b6c4436a2e65de27961ed071",
|
||||
"org.opencontainers.image.licenses=MIT"
|
||||
]
|
||||
],
|
||||
[
|
||||
'event_tag_v2.0.8-beta.67.env',
|
||||
{
|
||||
|
|
1
dist/index.js
generated
vendored
1
dist/index.js
generated
vendored
|
@ -240,6 +240,7 @@ class Meta {
|
|||
else if (/^refs\/pull\//.test(this.context.ref)) {
|
||||
version.main = `pr-${this.context.ref.replace(/^refs\/pull\//g, '').replace(/\/merge$/g, '')}`;
|
||||
}
|
||||
version.partial = version.partial.filter((item, index) => version.partial.indexOf(item) === index);
|
||||
return version;
|
||||
}
|
||||
tags() {
|
||||
|
|
|
@ -82,6 +82,7 @@ export class Meta {
|
|||
version.main = `pr-${this.context.ref.replace(/^refs\/pull\//g, '').replace(/\/merge$/g, '')}`;
|
||||
}
|
||||
|
||||
version.partial = version.partial.filter((item, index) => version.partial.indexOf(item) === index);
|
||||
return version;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue