@@ -2015,7 +2015,41 @@ describe('raw', () => {
2015
2015
"org.opencontainers.image.revision=90dd6032fac8bda1b6c4436a2e65de27961ed071" ,
2016
2016
"org.opencontainers.image.licenses=MIT"
2017
2017
]
2018
- ]
2018
+ ] ,
2019
+ [
2020
+ 'raw10' ,
2021
+ 'event_push.env' ,
2022
+ {
2023
+ images : [ 'user/app' ] ,
2024
+ tags : [
2025
+ `type=raw,foo` ,
2026
+ `type=raw,bar,enable=false` ,
2027
+ `type=raw,baz,enable=true`
2028
+ ] ,
2029
+ flavor : [
2030
+ `latest=false`
2031
+ ]
2032
+ } as Inputs ,
2033
+ {
2034
+ main : 'foo' ,
2035
+ partial : [ 'baz' ] ,
2036
+ latest : false
2037
+ } as Version ,
2038
+ [
2039
+ 'user/app:foo' ,
2040
+ 'user/app:baz' ,
2041
+ ] ,
2042
+ [
2043
+ "org.opencontainers.image.title=Hello-World" ,
2044
+ "org.opencontainers.image.description=This your first repo!" ,
2045
+ "org.opencontainers.image.url=https://github.com/octocat/Hello-World" ,
2046
+ "org.opencontainers.image.source=https://github.com/octocat/Hello-World" ,
2047
+ "org.opencontainers.image.version=foo" ,
2048
+ "org.opencontainers.image.created=2020-01-10T00:30:00.000Z" ,
2049
+ "org.opencontainers.image.revision=90dd6032fac8bda1b6c4436a2e65de27961ed071" ,
2050
+ "org.opencontainers.image.licenses=MIT"
2051
+ ]
2052
+ ] ,
2019
2053
] ) ( 'given %p wth %p event' , tagsLabelsTest ) ;
2020
2054
} ) ;
2021
2055
@@ -2324,3 +2358,40 @@ describe('bake', () => {
2324
2358
expect ( JSON . parse ( fs . readFileSync ( bakeFile , 'utf8' ) ) ) . toEqual ( exBakeDefinition ) ;
2325
2359
} ) ;
2326
2360
} ) ;
2361
+
2362
+ describe ( 'push' , ( ) => {
2363
+ // prettier-ignore
2364
+ test . each ( [
2365
+ [
2366
+ 'push15' ,
2367
+ 'event_push_defbranch.env' ,
2368
+ {
2369
+ images : [ 'user/app' ] ,
2370
+ tags : [
2371
+ `type=match,pattern=v(.*),group=1,value=v1.2.3` ,
2372
+ `type=edge`
2373
+ ] ,
2374
+ } as Inputs ,
2375
+ {
2376
+ main : '1.2.3' ,
2377
+ partial : [ 'edge' ] ,
2378
+ latest : true
2379
+ } as Version ,
2380
+ [
2381
+ 'user/app:1.2.3' ,
2382
+ 'user/app:edge' ,
2383
+ 'user/app:latest'
2384
+ ] ,
2385
+ [
2386
+ "org.opencontainers.image.title=Hello-World" ,
2387
+ "org.opencontainers.image.description=This your first repo!" ,
2388
+ "org.opencontainers.image.url=https://github.com/octocat/Hello-World" ,
2389
+ "org.opencontainers.image.source=https://github.com/octocat/Hello-World" ,
2390
+ "org.opencontainers.image.version=1.2.3" ,
2391
+ "org.opencontainers.image.created=2020-01-10T00:30:00.000Z" ,
2392
+ "org.opencontainers.image.revision=90dd6032fac8bda1b6c4436a2e65de27961ed071" ,
2393
+ "org.opencontainers.image.licenses=MIT"
2394
+ ]
2395
+ ]
2396
+ ] ) ( 'given %p with %p event' , tagsLabelsTest ) ;
2397
+ } ) ;
0 commit comments