File tree Expand file tree Collapse file tree 2 files changed +19
-2
lines changed
Expand file tree Collapse file tree 2 files changed +19
-2
lines changed Original file line number Diff line number Diff line change 1+ # docker-build-action
2+ This GitHub action will log into the specified Docker Registry and build 1 or 2 images based on the given config.
3+
4+ ## Config
5+ ` registry ` : Registry's host
6+ ` user ` : Registry's user
7+ ` password ` : Registry user's password or token
8+ ` image ` : Docker image name without tag
9+ ` tag ` : Docker image tag
10+ ` build_dev ` : Creates a -dev image too if set to true
Original file line number Diff line number Diff line change @@ -17,6 +17,10 @@ inputs:
1717 tag :
1818 description : " Docker image tag"
1919 required : true
20+ build_dev :
21+ description : ' Creates a -dev image too if set to true (default: "false")'
22+ required : true
23+ default : " false"
2024
2125runs :
2226 using : " composite"
@@ -38,27 +42,30 @@ runs:
3842 images : ${{ inputs.image }}
3943
4044 - name : Build and push -dev image
45+ if : ${{ inputs.build_dev }} == "true"
41464247 with :
4348 context : ${{ github.workspace }}
44- cache-from : ${{ inputs.image }}:${{ inputs.tag }}
4549 platforms : linux/amd64
4650 push : true
4751 build-args : |
4852 DEV=yes
4953 tags : |
5054 ${{ inputs.image }}:${{ inputs.tag }}-dev
5155 labels : ${{ steps.meta.outputs.labels }}
56+ cache-from : type=gha
57+ cache-to : type=gha,mode=max
5258
5359 - name : Build and push prod image
54605561 with :
5662 context : ${{ github.workspace }}
57- cache-from : ${{ inputs.image }}:${{ inputs.tag }}
5863 platforms : linux/amd64
5964 push : true
6065 build-args : |
6166 DEV=no
6267 tags : |
6368 ${{ inputs.image }}:${{ inputs.tag }}
6469 labels : ${{ steps.meta.outputs.labels }}
70+ cache-from : type=gha
71+ cache-to : type=gha,mode=max
You can’t perform that action at this time.
0 commit comments