Skip to content

Commit

Permalink
Add project selection to workflow_dispatch
Browse files Browse the repository at this point in the history
  • Loading branch information
lecafard committed Jun 21, 2024
1 parent 97813e0 commit 115b48e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ on:
paths:
- vendor/**
workflow_dispatch:
inputs:
projects:
required: true
description: A list of vendor projects (top level folder in vendors/) separated by spaces.
type: string
env:
REGISTRY: ghcr.io
DOCKER_BUILDKIT: 1
Expand All @@ -32,5 +37,5 @@ jobs:
uses: docker/setup-buildx-action@v1

- name: docker buildx build and push
run: ./scripts/build-and-push-changed.sh
run: ./scripts/build-and-push.sh ${{ inputs.projects }}

Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@
export CONTAINER_PREFIX="ghcr.io/"`echo "$GITHUB_REPOSITORY" | tr 'A-Z' 'a-z'`

source ./scripts/_common.sh
for project in `get_changed_compose_projects`; do

for project in $projects; do
(
cd "$project"
echo "Building and pushing $project"
docker buildx bake --push \
--set '*.cache-from=type=gha' \
--set '*.cache-to=type=gha,mode=max' \
Expand Down

0 comments on commit 115b48e

Please sign in to comment.