Skip to content

Commit 4c40eb2

Browse files
committed
feat: add 'just' option to devcontainer choices and enhance build args handling
Signed-off-by: Aaron Wislang <aaron.wislang@microsoft.com>
1 parent 61d6aed commit 4c40eb2

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

.github/workflows/build-single-devcontainer.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,16 @@ on:
1313
- 'ai-container'
1414
- 'llm-container'
1515
- 'wassette-container'
16+
- 'just'
1617
default: 'default-container'
1718
image_tag:
1819
description: 'Image tag (e.g., latest, v1.0.0)'
1920
required: false
2021
default: 'latest'
22+
build_args:
23+
description: 'Additional build arguments (key=value pairs, one per line)'
24+
required: false
25+
type: string
2126

2227
jobs:
2328
build-and-push:
@@ -48,6 +53,18 @@ jobs:
4853
image_name="${devcontainer%-container}"
4954
echo "name=$image_name" >> $GITHUB_OUTPUT
5055
56+
- name: Prepare build arguments
57+
id: build-args
58+
run: |
59+
build_args="${{ github.event.inputs.build_args }}"
60+
61+
# Output for the build step
62+
if [[ -n "$build_args" ]]; then
63+
echo "args<<EOF" >> $GITHUB_OUTPUT
64+
echo "$build_args" >> $GITHUB_OUTPUT
65+
echo "EOF" >> $GITHUB_OUTPUT
66+
fi
67+
5168
- name: Extract metadata
5269
id: meta
5370
uses: docker/metadata-action@v5
@@ -68,6 +85,7 @@ jobs:
6885
push: true
6986
tags: ${{ steps.meta.outputs.tags }}
7087
labels: ${{ steps.meta.outputs.labels }}
88+
build-args: ${{ steps.build-args.outputs.args }}
7189
cache-from: type=gha,scope=${{ github.event.inputs.devcontainer_choice }}
7290
cache-to: type=gha,mode=max,scope=${{ github.event.inputs.devcontainer_choice }}
7391

0 commit comments

Comments
 (0)