Skip to content

Commit 5a839d6

Browse files
author
James Brundage
committed
Updating build definition
1 parent 37f9585 commit 5a839d6

1 file changed

Lines changed: 51 additions & 2 deletions

File tree

Build/GitHub/Jobs/BuildIrregular.psd1

Lines changed: 51 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,56 @@
1414
'UseIrregularAction',
1515
'RunPipeScript',
1616
'RunEZOut',
17-
'RunHelpOut'
18-
17+
'RunHelpOut',
18+
@{
19+
'name'='Log in to ghcr.io'
20+
'uses'='docker/login-action@master'
21+
'with'=@{
22+
'registry'='${{ env.REGISTRY }}'
23+
'username'='${{ github.actor }}'
24+
'password'='${{ secrets.GITHUB_TOKEN }}'
25+
}
26+
},
27+
@{
28+
name = 'Extract Docker Metadata (for branch)'
29+
if = '${{github.ref_name != ''main'' && github.ref_name != ''master'' && github.ref_name != ''latest''}}'
30+
id = 'meta'
31+
uses = 'docker/metadata-action@master'
32+
with = @{
33+
'images'='${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}'
34+
}
35+
},
36+
@{
37+
name = 'Extract Docker Metadata (for main)'
38+
if = '${{github.ref_name == ''main'' || github.ref_name == ''master'' || github.ref_name == ''latest''}}'
39+
id = 'metaMain'
40+
uses = 'docker/metadata-action@master'
41+
with = @{
42+
'images'='${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}'
43+
'flavor'='latest=true'
44+
}
45+
},
46+
@{
47+
name = 'Build and push Docker image (from main)'
48+
if = '${{github.ref_name == ''main'' || github.ref_name == ''master'' || github.ref_name == ''latest''}}'
49+
uses = 'docker/build-push-action@master'
50+
with = @{
51+
'context'='.'
52+
'push'='true'
53+
'tags'='${{ steps.metaMain.outputs.tags }}'
54+
'labels'='${{ steps.metaMain.outputs.labels }}'
55+
}
56+
},
57+
@{
58+
name = 'Build and push Docker image (from branch)'
59+
if = '${{github.ref_name != ''main'' && github.ref_name != ''master'' && github.ref_name != ''latest''}}'
60+
uses = 'docker/build-push-action@master'
61+
with = @{
62+
'context'='.'
63+
'push'='true'
64+
'tags'='${{ steps.meta.outputs.tags }}'
65+
'labels'='${{ steps.meta.outputs.labels }}'
66+
}
67+
}
1968
)
2069
}

0 commit comments

Comments
 (0)