@@ -379,22 +379,20 @@ describe('push', () => {
379
379
] ,
380
380
} as Inputs ,
381
381
{
382
- main : 'master ' ,
383
- partial : [ 'sha-90dd603' ] ,
382
+ main : 'sha-90dd603 ' ,
383
+ partial : [ ] ,
384
384
latest : false
385
385
} as Version ,
386
386
[
387
- 'org/app:master' ,
388
387
'org/app:sha-90dd603' ,
389
- 'ghcr.io/user/app:master' ,
390
388
'ghcr.io/user/app:sha-90dd603'
391
389
] ,
392
390
[
393
391
"org.opencontainers.image.title=Hello-World" ,
394
392
"org.opencontainers.image.description=This your first repo!" ,
395
393
"org.opencontainers.image.url=https://github.com/octocat/Hello-World" ,
396
394
"org.opencontainers.image.source=https://github.com/octocat/Hello-World" ,
397
- "org.opencontainers.image.version=master " ,
395
+ "org.opencontainers.image.version=sha-90dd603 " ,
398
396
"org.opencontainers.image.created=2020-01-10T00:30:00.000Z" ,
399
397
"org.opencontainers.image.revision=90dd6032fac8bda1b6c4436a2e65de27961ed071" ,
400
398
"org.opencontainers.image.licenses=MIT"
@@ -411,22 +409,20 @@ describe('push', () => {
411
409
] ,
412
410
} as Inputs ,
413
411
{
414
- main : 'my-feature-1245 ' ,
415
- partial : [ 'sha-90dd603' ] ,
412
+ main : 'sha-90dd603 ' ,
413
+ partial : [ ] ,
416
414
latest : false
417
415
} as Version ,
418
416
[
419
- 'org/app:my-feature-1245' ,
420
417
'org/app:sha-90dd603' ,
421
- 'ghcr.io/user/app:my-feature-1245' ,
422
418
'ghcr.io/user/app:sha-90dd603'
423
419
] ,
424
420
[
425
421
"org.opencontainers.image.title=Hello-World" ,
426
422
"org.opencontainers.image.description=This your first repo!" ,
427
423
"org.opencontainers.image.url=https://github.com/octocat/Hello-World" ,
428
424
"org.opencontainers.image.source=https://github.com/octocat/Hello-World" ,
429
- "org.opencontainers.image.version=my-feature-1245 " ,
425
+ "org.opencontainers.image.version=sha-90dd603 " ,
430
426
"org.opencontainers.image.created=2020-01-10T00:30:00.000Z" ,
431
427
"org.opencontainers.image.revision=90dd6032fac8bda1b6c4436a2e65de27961ed071" ,
432
428
"org.opencontainers.image.licenses=MIT"
@@ -444,20 +440,17 @@ describe('push', () => {
444
440
] ,
445
441
} as Inputs ,
446
442
{
447
- main : 'my-feature-1245' ,
443
+ main : undefined ,
448
444
partial : [ ] ,
449
445
latest : false
450
446
} as Version ,
451
- [
452
- 'org/app:my-feature-1245' ,
453
- 'ghcr.io/user/app:my-feature-1245'
454
- ] ,
447
+ [ ] ,
455
448
[
456
449
"org.opencontainers.image.title=Hello-World" ,
457
450
"org.opencontainers.image.description=This your first repo!" ,
458
451
"org.opencontainers.image.url=https://github.com/octocat/Hello-World" ,
459
452
"org.opencontainers.image.source=https://github.com/octocat/Hello-World" ,
460
- "org.opencontainers.image.version=my-feature-1245 " ,
453
+ "org.opencontainers.image.version=" ,
461
454
"org.opencontainers.image.created=2020-01-10T00:30:00.000Z" ,
462
455
"org.opencontainers.image.revision=90dd6032fac8bda1b6c4436a2e65de27961ed071" ,
463
456
"org.opencontainers.image.licenses=MIT"
@@ -646,6 +639,37 @@ describe('push', () => {
646
639
"org.opencontainers.image.revision=90dd6032fac8bda1b6c4436a2e65de27961ed071" ,
647
640
"org.opencontainers.image.licenses=MIT"
648
641
]
642
+ ] ,
643
+ [
644
+ 'push19' ,
645
+ 'event_push.env' ,
646
+ {
647
+ images : [ 'org/app' , 'ghcr.io/user/app' ] ,
648
+ tags : [
649
+ `type=edge,branch=master` ,
650
+ `type=ref,event=branch,enable=false` ,
651
+ `type=sha,format=long`
652
+ ] ,
653
+ } as Inputs ,
654
+ {
655
+ main : 'sha-90dd6032fac8bda1b6c4436a2e65de27961ed071' ,
656
+ partial : [ ] ,
657
+ latest : false
658
+ } as Version ,
659
+ [
660
+ 'org/app:sha-90dd6032fac8bda1b6c4436a2e65de27961ed071' ,
661
+ 'ghcr.io/user/app:sha-90dd6032fac8bda1b6c4436a2e65de27961ed071'
662
+ ] ,
663
+ [
664
+ "org.opencontainers.image.title=Hello-World" ,
665
+ "org.opencontainers.image.description=This your first repo!" ,
666
+ "org.opencontainers.image.url=https://github.com/octocat/Hello-World" ,
667
+ "org.opencontainers.image.source=https://github.com/octocat/Hello-World" ,
668
+ "org.opencontainers.image.version=sha-90dd6032fac8bda1b6c4436a2e65de27961ed071" ,
669
+ "org.opencontainers.image.created=2020-01-10T00:30:00.000Z" ,
670
+ "org.opencontainers.image.revision=90dd6032fac8bda1b6c4436a2e65de27961ed071" ,
671
+ "org.opencontainers.image.licenses=MIT"
672
+ ]
649
673
]
650
674
] ) ( 'given %p with %p event' , tagsLabelsTest ) ;
651
675
} ) ;
@@ -1377,28 +1401,26 @@ describe('tag', () => {
1377
1401
{
1378
1402
images : [ 'org/app' ] ,
1379
1403
tags : [
1380
- `type=pep440,pattern={{version}}` ,
1381
- `type=pep440,pattern={{major}}.{{minor}}` ,
1382
- `type=pep440,pattern={{major}}`
1404
+ `type=pep440,pattern={{raw}}` ,
1405
+ `type=pep440,pattern={{major}}.{{minor}}`
1383
1406
]
1384
1407
} as Inputs ,
1385
1408
{
1386
- main : '1 .1.1' ,
1387
- partial : [ '1.1' , '1' ] ,
1409
+ main : 'v1 .1.1' ,
1410
+ partial : [ '1.1' ] ,
1388
1411
latest : true
1389
1412
} as Version ,
1390
1413
[
1391
- 'org/app:1 .1.1' ,
1414
+ 'org/app:v1 .1.1' ,
1392
1415
'org/app:1.1' ,
1393
- 'org/app:1' ,
1394
1416
'org/app:latest'
1395
1417
] ,
1396
1418
[
1397
1419
"org.opencontainers.image.title=Hello-World" ,
1398
1420
"org.opencontainers.image.description=This your first repo!" ,
1399
1421
"org.opencontainers.image.url=https://github.com/octocat/Hello-World" ,
1400
1422
"org.opencontainers.image.source=https://github.com/octocat/Hello-World" ,
1401
- "org.opencontainers.image.version=1 .1.1" ,
1423
+ "org.opencontainers.image.version=v1 .1.1" ,
1402
1424
"org.opencontainers.image.created=2020-01-10T00:30:00.000Z" ,
1403
1425
"org.opencontainers.image.revision=90dd6032fac8bda1b6c4436a2e65de27961ed071" ,
1404
1426
"org.opencontainers.image.licenses=MIT"
0 commit comments