Skip to content

Commit 29b42f0

Browse files
committed
WIP
1 parent d4c1cba commit 29b42f0

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

.github/workflows/build-push-image.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ name: Build & Push
22

33
on:
44
workflow_call:
5+
inputs:
6+
subdirectory:
7+
required: false
58

69
jobs:
710
build-push:
@@ -26,7 +29,7 @@ jobs:
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'}}
@@ -60,6 +63,7 @@ jobs:
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

0 commit comments

Comments
 (0)