This is an automated email from the ASF dual-hosted git repository.

houston pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/solr-docker.git


The following commit(s) were added to refs/heads/main by this push:
     new 1758215  Upgrade stackbrew, fix gitCommit, remove 32bit images (#23)
1758215 is described below

commit 1758215f91ed62b184ffabac059b4fcb265c4649
Author: Houston Putman <[email protected]>
AuthorDate: Thu May 30 13:59:52 2024 -0400

    Upgrade stackbrew, fix gitCommit, remove 32bit images (#23)
---
 .github/workflows/pr-for-official-repo.yml | 5 ++++-
 generate-stackbrew-library.sh              | 8 +++++---
 2 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/.github/workflows/pr-for-official-repo.yml 
b/.github/workflows/pr-for-official-repo.yml
index c3b26c5..5e45ea6 100644
--- a/.github/workflows/pr-for-official-repo.yml
+++ b/.github/workflows/pr-for-official-repo.yml
@@ -20,6 +20,9 @@ jobs:
     steps:
       # Setup
       - uses: actions/checkout@v4
+        with:
+          # This is required for stackbrew to know which commit a dockerfile 
belongs to
+          fetch-depth: 0
       - name: Checkout official-images fork
         uses: actions/checkout@v4
         with:
@@ -33,7 +36,7 @@ jobs:
       - name: Install BashBrew
         run: |
           mkdir -p "${HOME}/.local/bin"
-          wget -nv --output-document="${HOME}/.local/bin/bashbrew" 
https://github.com/docker-library/bashbrew/releases/download/v0.1.3/bashbrew-amd64
+          wget -nv --output-document="${HOME}/.local/bin/bashbrew" 
https://github.com/docker-library/bashbrew/releases/download/v0.1.12/bashbrew-amd64
           chmod a+x "${HOME}/.local/bin/bashbrew"
           echo "${HOME}/.local/bin" >> $GITHUB_PATH
       - name: Generate new Solr manifest
diff --git a/generate-stackbrew-library.sh b/generate-stackbrew-library.sh
index 32df8cb..68d1494 100755
--- a/generate-stackbrew-library.sh
+++ b/generate-stackbrew-library.sh
@@ -49,7 +49,7 @@ getArches() {
        local repo="$1"; shift
        local 
officialImagesUrl='https://github.com/docker-library/official-images/raw/master/library/'
 
-               eval "declare -g -A parentRepoToArches=( $(
+       eval "declare -g -A parentRepoToArches=( $(
                find . -name 'Dockerfile' -not -path "./official-images/*" 
-exec awk '
                                toupper($1) == "FROM" && $2 !~ 
/^('"$repo"'|scratch|microsoft\/[^:]+)(:|$)/ {
                                        print "'"$officialImagesUrl"'" $2
@@ -110,12 +110,14 @@ for version in "${versions[@]}"; do
                fi
 
                variantParent="$(awk 'toupper($1) == "FROM" { print $2 }' 
"$dir/Dockerfile")"
-               variantArches="${parentRepoToArches[$variantParent]}"
+               variantArches=(${parentRepoToArches[$variantParent]})
+               # Do not produce 32bit images
+               variantArches=("${variantArches[@]/*32*}")
 
                echo
                cat <<-EOE
                        Tags: $(sed -E 's/ +/, /g' <<<"${variantAliases[@]}")
-                       Architectures: $(sed -E 's/ +/, /g' <<<"$variantArches")
+                       Architectures: $(sed -E 's/ +/, /g' 
<<<"${variantArches[@]}")
                        GitCommit: $commit
                        Directory: $dir
                EOE

Reply via email to