From f9f6e66d5f4a931d1ee6c56dceec919c390a7439 Mon Sep 17 00:00:00 2001 From: Charlie Drage Date: Sat, 22 Jun 2024 21:21:00 -0400 Subject: [PATCH] Update push.yaml --- .github/workflows/push.yaml | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/.github/workflows/push.yaml b/.github/workflows/push.yaml index 867dd16..5eeb2d8 100644 --- a/.github/workflows/push.yaml +++ b/.github/workflows/push.yaml @@ -30,9 +30,26 @@ jobs: - name: Build and push images run: | + + - name: Build and push images + run: | + ls -lah for dir in containerfiles/*/; do repo_name=$(basename "$dir") - docker buildx build --platform linux/amd64,linux/arm64 \ - -t ghcr.io/${{ secrets.REGISTRY_USERNAME }}/${repo_name}:latest \ - --push "$dir" + if [[ "$repo_name" == bootc-* ]]; then + echo "Skipping $repo_name: Ignored by pattern" + continue + fi + if [ -d "$dir" ]; then + if [ -f "$dir/Dockerfile" ]; then + echo "Building and pushing $repo_name" + docker buildx build --platform linux/amd64,linux/arm64 \ + -t quay.io/${{ secrets.QUAY_USERNAME }}/${repo_name}:latest \ + --push "$dir" + else + echo "Skipping $repo_name: No Dockerfile found" + fi + else + echo "Skipping $dir: Not a directory" + fi done