Skip to content

Commit

Permalink
Update push.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
cdrage authored Jun 23, 2024
1 parent 74d06b5 commit f9f6e66
Showing 1 changed file with 20 additions and 3 deletions.
23 changes: 20 additions & 3 deletions .github/workflows/push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit f9f6e66

Please sign in to comment.