File tree Expand file tree Collapse file tree 1 file changed +20
-1
lines changed Expand file tree Collapse file tree 1 file changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -115,12 +115,31 @@ jobs:
115115 if [ -n "${{ secrets.LICENSE }}" ]; then
116116 echo "${{ secrets.LICENSE }}" > dist/LICENSE.txt
117117 echo "License file created at dist/LICENSE.txt"
118+ echo "target=with-licence" >> $GITHUB_OUTPUT
118119 else
119120 echo "LICENSE_TEXT secret not provided. Skipping license file creation."
120121 fi
121122
122123
123- - name : Build and push
124+ - name : Build and push with licence
125+ if : ${{ secrets.LICENSE != '' }}
126+ uses : docker/build-push-action@v6
127+ with :
128+ file : ${{ inputs.build-file || 'Dockerfile' }}
129+ context : ${{ inputs.build-context || '.'}}
130+ target : ${{ steps.license.outputs.target }}
131+ push : ${{ inputs.build-push }}
132+ provenance : false
133+ tags : ${{ steps.meta.outputs.tags }}
134+ labels : ${{ steps.meta.outputs.labels }}
135+ cache-from : type=gha
136+ cache-to : type=gha,mode=max,ignore-error=true
137+ platforms : ${{ inputs.build-platforms }}
138+ build-args : ${{ inputs.build-args }}
139+ secrets : ${{ secrets.build-secrets }}
140+
141+ - name : Build and push without licence
142+ if : ${{ secrets.LICENSE != '' }}
124143 uses : docker/build-push-action@v6
125144 with :
126145 file : ${{ inputs.build-file || 'Dockerfile' }}
You can’t perform that action at this time.
0 commit comments