File tree Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change 4141 description : " Architecture platforms for the image build (linux/amd64,linux/arm64, etc.)"
4242 type : string
4343 default : " "
44+ artifact-name :
45+ required : false
46+ description : " Name of an artifact to be downloaded. Setting this will set the downloaded artifact direcory as image building base."
47+ type : string
48+ default : " "
4449 secrets :
4550 QUAY_USERNAME :
4651 required : true
@@ -102,13 +107,21 @@ jobs:
102107 echo "IMAGE_TAGS=${IMAGE_TAGS}" >> "${GITHUB_ENV}"
103108 echo "IMAGE_VERSION=${IMAGE_VERSION}" >> "${GITHUB_ENV}"
104109
110+ - name : Download artifact
111+ id : download-artifact
112+ if : ${{ inputs.artifact-name }} != ""
113+ uses : actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
114+ with :
115+ name : ${{ inputs.artifact-name }}
116+ path : /tmp/build-${{ inputs.image-name }}
117+
105118 - name : Build ${{ inputs.image-name }} image
106119 uses : mr-smithers-excellent/docker-build-push@19d2beefef6bcdc202195fdcb9deb79a4fab5c1f # v6.8
107120 with :
108121 image : metal3-io/${{ inputs.image-name }}
109122 tags : ${{ env.IMAGE_TAGS }}
110- directory : ${{ inputs.dockerfile-directory }}
111- dockerfile : ${{ inputs.dockerfile-directory }}/Dockerfile
123+ directory : ${{ steps.download-artifact.outputs.download-path || inputs.dockerfile-directory }}
124+ dockerfile : ${{ steps.download-artifact.outputs.download-path || inputs.dockerfile-directory }}/Dockerfile
112125 buildArgs : ${{ inputs.image-build-args || '' }}
113126 labels : |
114127 org.opencontainers.image.version=${{ env.IMAGE_VERSION }}
You can’t perform that action at this time.
0 commit comments