File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,9 @@ name: Build & Push
22
33on :
44 workflow_call :
5+ inputs :
6+ subdirectory :
7+ required : false
58
69jobs :
710 build-push :
2629 id : remote
2730 run : |
2831 echo "registry=${{ steps.visibility.outputs.visibility == 'public' && 'ghcr.io' || '917951871879.dkr.ecr.eu-west-1.amazonaws.com' }}" >> $GITHUB_OUTPUT
29- echo "repository=${{ steps.visibility.outputs.visibility == 'public' && github.repository || github.event.repository.name }}" >> $GITHUB_OUTPUT
32+ echo "repository=${{ steps.visibility.outputs.visibility == 'public' && github.repository || github.event.repository.name }}${{ inputs.subdirectory && format('/{0}', inputs.subdirectory) || '' }} " >> $GITHUB_OUTPUT
3033
3134 - name : AWS Credentials
3235 if : ${{ steps.remote.outputs.registry == '917951871879.dkr.ecr.eu-west-1.amazonaws.com'}}
6063 id : build
6164 uses : docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0
6265 with :
66+ context : {{defaultContext}}:${{ inputs.subdirectory }}
6367 labels : ${{ steps.meta.outputs.labels }}
6468 tags : ${{ steps.meta.outputs.tags }}
6569 cache-from : type=gha
You can’t perform that action at this time.
0 commit comments