@@ -582,6 +582,46 @@ jobs:
582
582
uses : StartAutomating/EZOut@master
583
583
- name : UseHelpOut
584
584
uses : StartAutomating/HelpOut@master
585
+ - name : Log in to ghcr.io
586
+ uses : docker/login-action@master
587
+ with :
588
+ registry : ${{ env.REGISTRY }}
589
+ username : ${{ github.actor }}
590
+ password : ${{ secrets.GITHUB_TOKEN }}
591
+ env :
592
+ REGISTRY : ghcr.io
593
+ - name : Extract Docker Metadata (for branch)
594
+ if : ${{github.ref_name != 'main' && github.ref_name != 'master' && github.ref_name != 'latest'}}
595
+ id : meta
596
+ uses : docker/metadata-action@master
597
+ with :
598
+ images : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
599
+ env :
600
+ REGISTRY : ghcr.io
601
+ IMAGE_NAME : ${{ github.repository }}
602
+ - name : Extract Docker Metadata (for main)
603
+ if : ${{github.ref_name == 'main' || github.ref_name == 'master' || github.ref_name == 'latest'}}
604
+ id : metaMain
605
+ uses : docker/metadata-action@master
606
+ with :
607
+ images : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
608
+ flavor : latest=true
609
+ - name : Build and push Docker image (from main)
610
+ if : ${{github.ref_name == 'main' || github.ref_name == 'master' || github.ref_name == 'latest'}}
611
+ uses : docker/build-push-action@master
612
+ with :
613
+ context : .
614
+ push : true
615
+ tags : ${{ steps.metaMain.outputs.tags }}
616
+ labels : ${{ steps.metaMain.outputs.labels }}
617
+ - name : Build and push Docker image (from branch)
618
+ if : ${{github.ref_name != 'main' && github.ref_name != 'master' && github.ref_name != 'latest'}}
619
+ uses : docker/build-push-action@master
620
+ with :
621
+ context : .
622
+ push : true
623
+ tags : ${{ steps.meta.outputs.tags }}
624
+ labels : ${{ steps.meta.outputs.labels }}
585
625
env :
586
626
NoCoverage : true
587
627
SYSTEM_ACCESSTOKEN : ${{ secrets.AZUREDEVOPSPAT }}
0 commit comments