File tree Expand file tree Collapse file tree 3 files changed +16
-5
lines changed
Expand file tree Collapse file tree 3 files changed +16
-5
lines changed Original file line number Diff line number Diff line change 11# Action that wraps together all the necessary actions to build an image and publish it.
22# It does not include login actions.
33# This is a convenience, so that we know that everything related to the build lies in this file,
4- # and if it gets updated we can automatically run our `test-docker-build` from `build-test.yml.`
4+ # and if it gets updated we can automatically run our `test-docker-build` from `build-test.yml.`,
5+ # so there is no confusion about which is the job that was updated, if there are many in the same workflow file.
56
67name : " Docker Build"
78description : " Builds Docker images with optional caching and multi-platform support"
89
910inputs :
10- push-image :
11+ push :
1112 description : " Whether to push the built image"
1213 required : false
1314 default : " false"
15+ load :
16+ description : " Whether to load the built image"
17+ required : false
18+ default : " false"
1419 platforms :
1520 description : " Target platforms for the build"
1621 required : false
5560 with :
5661 context : ${{ inputs.context }}
5762 file : ${{ inputs.dockerfile }}
58- push : ${{ inputs[' push-image'] }}
63+ push : ${{ inputs. push }}
5964 platforms : ${{ inputs.platforms }}
6065 tags : ${{ steps.meta.outputs.tags }}
6166 labels : ${{ steps.meta.outputs.labels }}
6267 cache-from : ${{ inputs['cache-from'] }}
6368 cache-to : ${{ inputs['cache-to'] }}
69+ load : ${{ inputs.load }}
Original file line number Diff line number Diff line change 9696 context : .
9797 file : ./Dockerfile
9898 push : false
99+ load : true
99100 platforms : linux/amd64,linux/arm64
100101 cache-from : type=registry,ref=ghcr.io/elementsinteractive/twyn:buildcache
101-
102+ iamge-name : elementsinteractive/twyn:test-build
103+
104+ - name : Test
105+ run : |
106+ docker run --rm elementsinteractive/twyn:test-build --version
Original file line number Diff line number Diff line change 5353 - name : Build and push Docker image
5454 uses : ./.github/actions/docker-build
5555 with :
56- push-image : " true"
56+ push : " true"
5757 platforms : linux/amd64,linux/arm64
5858 dockerfile : ./Dockerfile
5959 context : .
You can’t perform that action at this time.
0 commit comments