@@ -733,6 +733,50 @@ describe('push', () => {
733733 "org.opencontainers.image.url=https://github.com/octocat/Hello-World" ,
734734 "org.opencontainers.image.version=sha-860c1904a1ce19322e91ac35af1ab07466440c37"
735735 ]
736+ ] ,
737+ [
738+ 'push21' ,
739+ 'event_push_master.env' ,
740+ {
741+ images : [ ] as string [ ] ,
742+ tags : [
743+ `type=raw,value=mytag-{{branch}}` ,
744+ `type=raw,value=mytag-{{date 'YYYYMMDD'}}` ,
745+ `type=raw,value=mytag-{{date 'YYYYMMDD-HHmmss' tz='Asia/Tokyo'}}` ,
746+ `type=raw,value=mytag-tag-{{tag}}` ,
747+ `type=raw,value=mytag-baseref-{{base_ref}}` ,
748+ `type=raw,value=mytag-defbranch,enable={{is_default_branch}}`
749+ ] ,
750+ } as Inputs ,
751+ {
752+ main : 'mytag-master' ,
753+ partial : [
754+ 'mytag-20200110' ,
755+ 'mytag-20200110-093000' ,
756+ 'mytag-tag-' ,
757+ 'mytag-baseref-' ,
758+ 'mytag-defbranch'
759+ ] ,
760+ latest : false
761+ } as Version ,
762+ [
763+ 'mytag-master' ,
764+ 'mytag-20200110' ,
765+ 'mytag-20200110-093000' ,
766+ 'mytag-tag-' ,
767+ 'mytag-baseref-' ,
768+ 'mytag-defbranch'
769+ ] ,
770+ [
771+ "org.opencontainers.image.created=2020-01-10T00:30:00.000Z" ,
772+ "org.opencontainers.image.description=This your first repo!" ,
773+ "org.opencontainers.image.licenses=MIT" ,
774+ "org.opencontainers.image.revision=266574110acf203503badf966df2ea24b5d732d7" ,
775+ "org.opencontainers.image.source=https://github.com/octocat/Hello-World" ,
776+ "org.opencontainers.image.title=Hello-World" ,
777+ "org.opencontainers.image.url=https://github.com/octocat/Hello-World" ,
778+ "org.opencontainers.image.version=mytag-master"
779+ ]
736780 ]
737781 ] ) ( 'given %p with %p event' , tagsLabelsTest ) ;
738782} ) ;
@@ -1780,6 +1824,43 @@ describe('tag', () => {
17801824 "org.opencontainers.image.version=v1.2.3rc2"
17811825 ]
17821826 ] ,
1827+ [
1828+ 'tag33' ,
1829+ 'event_tag_v1.1.1.env' ,
1830+ {
1831+ images : [ ] as string [ ] ,
1832+ tags : [
1833+ `type=pep440,pattern={{version}}` ,
1834+ `type=pep440,pattern={{major}}.{{minor}}.{{patch}}` ,
1835+ `type=pep440,pattern={{major}}.{{minor}}` ,
1836+ `type=pep440,pattern={{major}}`
1837+ ]
1838+ } as Inputs ,
1839+ {
1840+ main : '1.1.1' ,
1841+ partial : [
1842+ "1.1" ,
1843+ "1"
1844+ ] ,
1845+ latest : true
1846+ } as Version ,
1847+ [
1848+ '1.1.1' ,
1849+ '1.1' ,
1850+ '1' ,
1851+ 'latest'
1852+ ] ,
1853+ [
1854+ "org.opencontainers.image.created=2020-01-10T00:30:00.000Z" ,
1855+ "org.opencontainers.image.description=This your first repo!" ,
1856+ "org.opencontainers.image.licenses=MIT" ,
1857+ "org.opencontainers.image.revision=860c1904a1ce19322e91ac35af1ab07466440c37" ,
1858+ "org.opencontainers.image.source=https://github.com/octocat/Hello-World" ,
1859+ "org.opencontainers.image.title=Hello-World" ,
1860+ "org.opencontainers.image.url=https://github.com/octocat/Hello-World" ,
1861+ "org.opencontainers.image.version=1.1.1"
1862+ ]
1863+ ]
17831864 ] ) ( 'given %p with %p event' , tagsLabelsTest ) ;
17841865} ) ;
17851866
@@ -2066,6 +2147,35 @@ describe('latest', () => {
20662147 "org.opencontainers.image.version=v1.1.1"
20672148 ]
20682149 ] ,
2150+ [
2151+ 'latest10' ,
2152+ 'event_tag_v2.0.8-beta.67.env' ,
2153+ {
2154+ images : [ ] as string [ ] ,
2155+ tags : [
2156+ `type=match,"pattern=\\d.\\d.\\d"`
2157+ ]
2158+ } as Inputs ,
2159+ {
2160+ main : '2.0.8' ,
2161+ partial : [ ] ,
2162+ latest : true
2163+ } as Version ,
2164+ [
2165+ '2.0.8' ,
2166+ 'latest' ,
2167+ ] ,
2168+ [
2169+ "org.opencontainers.image.created=2020-01-10T00:30:00.000Z" ,
2170+ "org.opencontainers.image.description=This your first repo!" ,
2171+ "org.opencontainers.image.licenses=MIT" ,
2172+ "org.opencontainers.image.revision=860c1904a1ce19322e91ac35af1ab07466440c37" ,
2173+ "org.opencontainers.image.source=https://github.com/octocat/Hello-World" ,
2174+ "org.opencontainers.image.title=Hello-World" ,
2175+ "org.opencontainers.image.url=https://github.com/octocat/Hello-World" ,
2176+ "org.opencontainers.image.version=2.0.8"
2177+ ]
2178+ ]
20692179 ] ) ( 'given %p with %p event' , tagsLabelsTest ) ;
20702180} ) ;
20712181
0 commit comments