1+ @ {
2+ " runs-on" = " ubuntu-latest"
3+ if = ' ${{ success() }}'
4+ steps = @ (
5+ @ {
6+ name = ' Check out repository'
7+ uses = ' actions/checkout@main'
8+ }
9+
10+ @ {
11+ ' name' = ' Log in to the Container registry'
12+ if = ' ${{github.ref_name == '' main'' || github.ref_name == '' master'' || github.ref_name == '' latest'' }}'
13+ ' uses' = ' docker/login-action@master'
14+ ' with' = @ {
15+ ' registry' = ' ${{ env.REGISTRY }}'
16+ ' username' = ' ${{ github.actor }}'
17+ ' password' = ' ${{ secrets.GITHUB_TOKEN }}'
18+ }
19+ }
20+ @ {
21+ name = ' Extract Docker Metadata (for main)'
22+ if = ' ${{github.ref_name == '' main'' || github.ref_name == '' master'' || github.ref_name == '' latest'' }}'
23+ ' id' = ' metaMain'
24+ ' uses' = ' docker/metadata-action@master'
25+ ' with' = @ {
26+ ' images' = ' ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}'
27+ ' flavor' = ' latest=true'
28+ }
29+ }
30+
31+ @ {
32+ name = ' Build and push Docker image (from main)'
33+ if = ' ${{github.ref_name == '' main'' || github.ref_name == '' master'' || github.ref_name == '' latest'' }}'
34+ uses = ' docker/build-push-action@master'
35+ ' with' = @ {
36+ ' context' = ' .'
37+ ' push' = ' true'
38+ ' tags' = ' ${{ steps.metaMain.outputs.tags }}'
39+ ' labels' = ' ${{ steps.metaMain.outputs.labels }}'
40+ }
41+ }
42+
43+ <# ,
44+ @{
45+ name = 'Use PSSVG Action'
46+ uses = 'StartAutomating/PSSVG@main'
47+ id = 'PSSVG'
48+ }
49+ @{
50+ name = 'Run ugit (from main)'
51+ if = '${{github.ref_name == ''main''}}'
52+ uses = 'StartAutomating/ugit@main'
53+ id = 'ugitMain'
54+ },
55+ @{
56+ name = 'Run ugit (on branch)'
57+ if = '${{github.ref_name != ''main''}}'
58+ uses = './'
59+ id = 'ugitBranch'
60+ }
61+ 'RunPipeScript',
62+ 'RunPiecemeal',
63+ 'RunEZOut',
64+ @{
65+ name = 'Run HelpOut'
66+ uses = 'StartAutomating/HelpOut@master'
67+ id = 'HelpOut'
68+ },
69+ @{
70+ 'name'='Log in to the Container registry (on branch)'
71+ 'uses'='docker/login-action@master'
72+ 'with'=@{
73+ 'registry'='${{ env.REGISTRY }}'
74+ 'username'='${{ github.actor }}'
75+ 'password'='${{ secrets.GITHUB_TOKEN }}'
76+ }
77+ },
78+ @{
79+ name = 'Extract Docker Metadata (for branch)'
80+ if = '${{github.ref_name != ''main'' && github.ref_name != ''master'' && github.ref_name != ''latest''}}'
81+ 'id'='meta'
82+ 'uses'='docker/metadata-action@master'
83+ 'with'=@{
84+ 'images'='${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}'
85+ }
86+ },
87+ @{
88+ name = 'Extract Docker Metadata (for main)'
89+ if = '${{github.ref_name == ''main'' || github.ref_name == ''master'' || github.ref_name == ''latest''}}'
90+ 'id'='metaMain'
91+ 'uses'='docker/metadata-action@master'
92+ 'with'=@{
93+ 'images'='${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}'
94+ 'flavor'='latest=true'
95+ }
96+ },
97+ @{
98+ name = 'Build and push Docker image (from main)'
99+ if = '${{github.ref_name == ''main'' || github.ref_name == ''master'' || github.ref_name == ''latest''}}'
100+ uses = 'docker/build-push-action@master'
101+ 'with'=@{
102+ 'context'='.'
103+ 'push'='true'
104+ 'tags'='${{ steps.metaMain.outputs.tags }}'
105+ 'labels'='${{ steps.metaMain.outputs.labels }}'
106+ }
107+ },
108+ @{
109+ name = 'Build and push Docker image (from branch)'
110+ if = '${{github.ref_name != ''main'' && github.ref_name != ''master'' && github.ref_name != ''latest''}}'
111+ uses = 'docker/build-push-action@master'
112+ with = @{
113+ 'context'='.'
114+ 'push'='true'
115+ 'tags'='${{ steps.meta.outputs.tags }}'
116+ 'labels'='${{ steps.meta.outputs.labels }}'
117+ }
118+ } #>
119+ )
120+ }
0 commit comments