mirror of
https://github.com/docker/metadata-action.git
synced 2025-04-11 12:00:23 +02:00
Handle tag-match-latest on Git tag event
This commit is contained in:
parent
b4c9b2116e
commit
8632141d51
@ -114,7 +114,7 @@ Following inputs can be used as `step.with` keys
|
|||||||
| `tag-edge-branch` | String | Branch that will be tagged as edge (default `repo.default_branch`) |
|
| `tag-edge-branch` | String | Branch that will be tagged as edge (default `repo.default_branch`) |
|
||||||
| `tag-match` | String | RegExp to match against a Git tag and use first match as Docker tag |
|
| `tag-match` | String | RegExp to match against a Git tag and use first match as Docker tag |
|
||||||
| `tag-match-group` | Number | Group to get if `tag-match` matches (default `0`) |
|
| `tag-match-group` | Number | Group to get if `tag-match` matches (default `0`) |
|
||||||
| `tag-match-latest` | Bool | Set `latest` Docker tag if `tag-match` matches (default `true`) |
|
| `tag-match-latest` | Bool | Set `latest` Docker tag if `tag-match` matches or on Git tag event (default `true`) |
|
||||||
| `tag-schedule` | String | [Template](#schedule-tag) to apply to schedule tag (default `nightly`) |
|
| `tag-schedule` | String | [Template](#schedule-tag) to apply to schedule tag (default `nightly`) |
|
||||||
| `sep-tags` | String | Separator to use for tags output (default `\n`) |
|
| `sep-tags` | String | Separator to use for tags output (default `\n`) |
|
||||||
| `sep-labels` | String | Separator to use for labels output (default `\n`) |
|
| `sep-labels` | String | Separator to use for labels output (default `\n`) |
|
||||||
|
@ -29,7 +29,7 @@ inputs:
|
|||||||
default: '0'
|
default: '0'
|
||||||
required: false
|
required: false
|
||||||
tag-match-latest:
|
tag-match-latest:
|
||||||
description: 'Set latest Docker tag if tag-match matches'
|
description: 'Set latest Docker tag if tag-match matches or on Git tag event'
|
||||||
default: 'true'
|
default: 'true'
|
||||||
required: false
|
required: false
|
||||||
tag-schedule:
|
tag-schedule:
|
||||||
|
2
dist/index.js
generated
vendored
2
dist/index.js
generated
vendored
@ -209,7 +209,7 @@ class Meta {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
version.latest = true;
|
version.latest = this.inputs.tagMatchLatest;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (/^refs\/heads\//.test(this.context.ref)) {
|
else if (/^refs\/heads\//.test(this.context.ref)) {
|
||||||
|
@ -53,7 +53,7 @@ export class Meta {
|
|||||||
version.latest = this.inputs.tagMatchLatest;
|
version.latest = this.inputs.tagMatchLatest;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
version.latest = true;
|
version.latest = this.inputs.tagMatchLatest;
|
||||||
}
|
}
|
||||||
} else if (/^refs\/heads\//.test(this.context.ref)) {
|
} else if (/^refs\/heads\//.test(this.context.ref)) {
|
||||||
version.version = this.context.ref.replace(/^refs\/heads\//g, '').replace(/\//g, '-');
|
version.version = this.context.ref.replace(/^refs\/heads\//g, '').replace(/\//g, '-');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user