From 73a24c0c7bafe5593a84c02d559fac555d337627 Mon Sep 17 00:00:00 2001 From: nkowenski Date: Wed, 25 Sep 2024 17:15:48 +0200 Subject: [PATCH 01/16] install rustc --- .github/workflows/build.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 82b7c70..29b3841 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -37,6 +37,7 @@ jobs: run: | sudo apt-get update sudo apt-get install -y qemu-user-static + sudo apt-get install -y rustc - name: Build Image id: build_image @@ -44,7 +45,7 @@ jobs: with: image: ${{ env.IMAGE_NAMESPACE }} tags: ${{ env.IMAGE_TAGS }} latest - platforms: linux/386, linux/amd64, linux/arm/v5, linux/arm/v7, linux/arm64/v8 + platforms: linux/386, linux/amd64 containerfiles: | ./Dockerfile.gh From 866dc54839c74f5db082a93449ef628e37de0553 Mon Sep 17 00:00:00 2001 From: nkowenski Date: Wed, 25 Sep 2024 17:27:02 +0200 Subject: [PATCH 02/16] build all here --- .github/workflows/build-alt.yaml | 3 ++- .github/workflows/build.yaml | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-alt.yaml b/.github/workflows/build-alt.yaml index 979c561..d2fd893 100644 --- a/.github/workflows/build-alt.yaml +++ b/.github/workflows/build-alt.yaml @@ -3,7 +3,7 @@ name: Build&Push Alt Images on: push: tags: - - '*' + - 'only-alts' # echo "Tag name from GITHUB_REF_NAME: $GITHUB_REF_NAME" # echo "Tag name from github.ref_name: ${{ github.ref_name }}" @@ -37,6 +37,7 @@ jobs: run: | sudo apt-get update sudo apt-get install -y qemu-user-static + sudo apt-get install -y rustc - name: Build alt Images id: build_alt_image diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 29b3841..bd3299f 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -45,7 +45,7 @@ jobs: with: image: ${{ env.IMAGE_NAMESPACE }} tags: ${{ env.IMAGE_TAGS }} latest - platforms: linux/386, linux/amd64 + platforms: linux/386, linux/amd64, linux/arm/v5, linux/arm/v7, linux/arm64/v8, linux/s390x #, linux/mips64le, linux/ppc64le, containerfiles: | ./Dockerfile.gh From 2347e91d20678fca64e6f2e80e0de12fe85121e3 Mon Sep 17 00:00:00 2001 From: nkowenski Date: Wed, 25 Sep 2024 22:17:27 +0200 Subject: [PATCH 03/16] do not build armv5 --- .github/workflows/build.yaml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index bd3299f..1544512 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -1,11 +1,12 @@ # Docker build images on tag name: Build&Push Images -on: - push: - tags: - - '*' -# echo "Tag name from GITHUB_REF_NAME: $GITHUB_REF_NAME" -# echo "Tag name from github.ref_name: ${{ github.ref_name }}" +on: [push] + +# push: +# tags: +# - '*' +# # echo "Tag name from GITHUB_REF_NAME: $GITHUB_REF_NAME" +# # echo "Tag name from github.ref_name: ${{ github.ref_name }}" env: IMAGE_TAGS: ${{ github.ref_name }} @@ -45,7 +46,7 @@ jobs: with: image: ${{ env.IMAGE_NAMESPACE }} tags: ${{ env.IMAGE_TAGS }} latest - platforms: linux/386, linux/amd64, linux/arm/v5, linux/arm/v7, linux/arm64/v8, linux/s390x #, linux/mips64le, linux/ppc64le, + platforms: linux/386, linux/amd64, linux/arm/v7, linux/arm64/v8, linux/s390x #, linux/mips64le, linux/ppc64le, containerfiles: | ./Dockerfile.gh From 37fcf7bb03adf793e8180f96041fe0758c1edaf7 Mon Sep 17 00:00:00 2001 From: nkowenski Date: Wed, 25 Sep 2024 22:56:33 +0200 Subject: [PATCH 04/16] runs on ubuntu 24.04 --- .github/workflows/build.yaml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 1544512..0d2993d 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -17,7 +17,7 @@ env: jobs: build-push-quay: name: Build&Push - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 # strategy: # fail-fast: false # matrix: @@ -38,7 +38,6 @@ jobs: run: | sudo apt-get update sudo apt-get install -y qemu-user-static - sudo apt-get install -y rustc - name: Build Image id: build_image @@ -46,7 +45,7 @@ jobs: with: image: ${{ env.IMAGE_NAMESPACE }} tags: ${{ env.IMAGE_TAGS }} latest - platforms: linux/386, linux/amd64, linux/arm/v7, linux/arm64/v8, linux/s390x #, linux/mips64le, linux/ppc64le, + platforms: linux/386, linux/amd64, linux/arm/v5, linux/arm/v7, linux/arm64/v8, linux/s390x #, linux/mips64le, linux/ppc64le, containerfiles: | ./Dockerfile.gh From 509fbe30264e7355500e8059f8e7ed8b51353310 Mon Sep 17 00:00:00 2001 From: nkowenski Date: Wed, 25 Sep 2024 23:13:15 +0200 Subject: [PATCH 05/16] separeta alternatives like it was before --- .github/workflows/build-alt.yaml | 16 ++++++++-------- .github/workflows/build.yaml | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build-alt.yaml b/.github/workflows/build-alt.yaml index d2fd893..e56e70e 100644 --- a/.github/workflows/build-alt.yaml +++ b/.github/workflows/build-alt.yaml @@ -1,11 +1,11 @@ # Docker build images on tag name: Build&Push Alt Images -on: - push: - tags: - - 'only-alts' -# echo "Tag name from GITHUB_REF_NAME: $GITHUB_REF_NAME" -# echo "Tag name from github.ref_name: ${{ github.ref_name }}" +on: [push] +# push: +# tags: +# - 'only-alts' +# # echo "Tag name from GITHUB_REF_NAME: $GITHUB_REF_NAME" +# # echo "Tag name from github.ref_name: ${{ github.ref_name }}" env: IMAGE_TAGS: ${{ github.ref_name }} @@ -16,7 +16,7 @@ env: jobs: build-push-quay: name: Build&Push Alt - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 # strategy: # fail-fast: false # matrix: @@ -45,7 +45,7 @@ jobs: with: image: ${{ env.IMAGE_NAMESPACE }} tags: alt-${{ env.IMAGE_TAGS }} - platforms: linux/s390x, linux/arm/v5, linux/arm/v7, linux/arm64/v8 #, linux/mips64le, linux/ppc64le, + platforms: linux/arm/v5, linux/arm/v7, linux/arm64/v8, linux/s390x #, linux/mips64le, linux/ppc64le, containerfiles: | ./Dockerfile-others.gh diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 0d2993d..cf8287f 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -45,7 +45,7 @@ jobs: with: image: ${{ env.IMAGE_NAMESPACE }} tags: ${{ env.IMAGE_TAGS }} latest - platforms: linux/386, linux/amd64, linux/arm/v5, linux/arm/v7, linux/arm64/v8, linux/s390x #, linux/mips64le, linux/ppc64le, + platforms: linux/386, linux/amd64 containerfiles: | ./Dockerfile.gh From 536086a951516dae8bac6152ad9e1e1429880993 Mon Sep 17 00:00:00 2001 From: nkowenski Date: Wed, 25 Sep 2024 23:21:42 +0200 Subject: [PATCH 06/16] try pydantic 2.3.0 --- src/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/requirements.txt b/src/requirements.txt index 7ef4ecc..ddfd518 100644 --- a/src/requirements.txt +++ b/src/requirements.txt @@ -1,4 +1,4 @@ kopf===1.37.2 kubernetes===19.15.0 setuptools>=65.5.1 # not directly required, pinned by Snyk to avoid a vulnerability -pydantic==2.4.0 \ No newline at end of file +pydantic==2.3.0 \ No newline at end of file From 8af7031e6d5b264759facf2e0f578b612d4bba18 Mon Sep 17 00:00:00 2001 From: nkowenski Date: Wed, 25 Sep 2024 23:33:03 +0200 Subject: [PATCH 07/16] split alt builds --- .github/workflows/build-alt.yaml | 34 ++++++++++++++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-alt.yaml b/.github/workflows/build-alt.yaml index e56e70e..1006c64 100644 --- a/.github/workflows/build-alt.yaml +++ b/.github/workflows/build-alt.yaml @@ -39,13 +39,43 @@ jobs: sudo apt-get install -y qemu-user-static sudo apt-get install -y rustc - - name: Build alt Images + - name: Build alt Image armv5 id: build_alt_image uses: redhat-actions/buildah-build@main with: image: ${{ env.IMAGE_NAMESPACE }} tags: alt-${{ env.IMAGE_TAGS }} - platforms: linux/arm/v5, linux/arm/v7, linux/arm64/v8, linux/s390x #, linux/mips64le, linux/ppc64le, + platforms: linux/arm/v5 + containerfiles: | + ./Dockerfile-others.gh + + - name: Build alt Image s390 + id: build_alt_image + uses: redhat-actions/buildah-build@main + with: + image: ${{ env.IMAGE_NAMESPACE }} + tags: alt-${{ env.IMAGE_TAGS }} + platforms: linux/s390x + containerfiles: | + ./Dockerfile-others.gh + + - name: Build alt Image armv8 + id: build_alt_image + uses: redhat-actions/buildah-build@main + with: + image: ${{ env.IMAGE_NAMESPACE }} + tags: alt-${{ env.IMAGE_TAGS }} + platforms: linux/arm64/v8 + containerfiles: | + ./Dockerfile-others.gh + + - name: Build alt Image armv7 + id: build_alt_image + uses: redhat-actions/buildah-build@main + with: + image: ${{ env.IMAGE_NAMESPACE }} + tags: alt-${{ env.IMAGE_TAGS }} + platforms: linux/arm/v7 containerfiles: | ./Dockerfile-others.gh From 0db516b50465d8d477d8060b78203f31cfc01445 Mon Sep 17 00:00:00 2001 From: nkowenski Date: Wed, 25 Sep 2024 23:34:51 +0200 Subject: [PATCH 08/16] fix same ids in build --- .github/workflows/build-alt.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-alt.yaml b/.github/workflows/build-alt.yaml index 1006c64..6f685c5 100644 --- a/.github/workflows/build-alt.yaml +++ b/.github/workflows/build-alt.yaml @@ -40,7 +40,7 @@ jobs: sudo apt-get install -y rustc - name: Build alt Image armv5 - id: build_alt_image + id: build_alt_imagev5 uses: redhat-actions/buildah-build@main with: image: ${{ env.IMAGE_NAMESPACE }} @@ -50,7 +50,7 @@ jobs: ./Dockerfile-others.gh - name: Build alt Image s390 - id: build_alt_image + id: build_alt_image390 uses: redhat-actions/buildah-build@main with: image: ${{ env.IMAGE_NAMESPACE }} @@ -60,7 +60,7 @@ jobs: ./Dockerfile-others.gh - name: Build alt Image armv8 - id: build_alt_image + id: build_alt_imagev8 uses: redhat-actions/buildah-build@main with: image: ${{ env.IMAGE_NAMESPACE }} @@ -70,7 +70,7 @@ jobs: ./Dockerfile-others.gh - name: Build alt Image armv7 - id: build_alt_image + id: build_alt_imagev7 uses: redhat-actions/buildah-build@main with: image: ${{ env.IMAGE_NAMESPACE }} From c80f292ee78f41146d538c1dd6b310bf024bd066 Mon Sep 17 00:00:00 2001 From: nkowenski Date: Wed, 25 Sep 2024 23:41:16 +0200 Subject: [PATCH 09/16] paralell builds alts --- .github/workflows/build-alt.yaml | 77 +++++++++++++++++++++++++++++++- 1 file changed, 76 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-alt.yaml b/.github/workflows/build-alt.yaml index 6f685c5..428176c 100644 --- a/.github/workflows/build-alt.yaml +++ b/.github/workflows/build-alt.yaml @@ -14,7 +14,7 @@ env: IMAGE_NAMESPACE : clustersecret jobs: - build-push-quay: + build-push-quay-v5: name: Build&Push Alt runs-on: ubuntu-24.04 # strategy: @@ -49,6 +49,31 @@ jobs: containerfiles: | ./Dockerfile-others.gh + build-push-quay-s390: + name: Build&Push Alt + runs-on: ubuntu-24.04 + # strategy: + # fail-fast: false + # matrix: + # install_latest: [ true, false ] #ubuntu-20.04 has a good enough podman. + steps: + # Checkout push-to-registry action github repository + - name: Checkout Push to Registry action + uses: actions/checkout@v2 + + # - name: Install latest podman + # if: matrix.install_latest + # run: | + # bash .github/install_latest_podman.sh + + - name: Install qemu dependency + # we need quemu-user-static for builds other archs with buildah + # https://github.com/containers/podman/issues/13924#issuecomment-1103434554 + run: | + sudo apt-get update + sudo apt-get install -y qemu-user-static + sudo apt-get install -y rustc + - name: Build alt Image s390 id: build_alt_image390 uses: redhat-actions/buildah-build@main @@ -59,6 +84,31 @@ jobs: containerfiles: | ./Dockerfile-others.gh + build-push-quay-armv8: + name: Build&Push Alt + runs-on: ubuntu-24.04 + # strategy: + # fail-fast: false + # matrix: + # install_latest: [ true, false ] #ubuntu-20.04 has a good enough podman. + steps: + # Checkout push-to-registry action github repository + - name: Checkout Push to Registry action + uses: actions/checkout@v2 + + # - name: Install latest podman + # if: matrix.install_latest + # run: | + # bash .github/install_latest_podman.sh + + - name: Install qemu dependency + # we need quemu-user-static for builds other archs with buildah + # https://github.com/containers/podman/issues/13924#issuecomment-1103434554 + run: | + sudo apt-get update + sudo apt-get install -y qemu-user-static + sudo apt-get install -y rustc + - name: Build alt Image armv8 id: build_alt_imagev8 uses: redhat-actions/buildah-build@main @@ -69,6 +119,31 @@ jobs: containerfiles: | ./Dockerfile-others.gh + build-push-quay-armv7: + name: Build&Push Alt + runs-on: ubuntu-24.04 + # strategy: + # fail-fast: false + # matrix: + # install_latest: [ true, false ] #ubuntu-20.04 has a good enough podman. + steps: + # Checkout push-to-registry action github repository + - name: Checkout Push to Registry action + uses: actions/checkout@v2 + + # - name: Install latest podman + # if: matrix.install_latest + # run: | + # bash .github/install_latest_podman.sh + + - name: Install qemu dependency + # we need quemu-user-static for builds other archs with buildah + # https://github.com/containers/podman/issues/13924#issuecomment-1103434554 + run: | + sudo apt-get update + sudo apt-get install -y qemu-user-static + sudo apt-get install -y rustc + - name: Build alt Image armv7 id: build_alt_imagev7 uses: redhat-actions/buildah-build@main From 4ac5eb75a94c9bc1072e2fb480bb37ac1991276c Mon Sep 17 00:00:00 2001 From: nkowenski Date: Wed, 25 Sep 2024 23:55:49 +0200 Subject: [PATCH 10/16] working status build all except armv5 --- .github/workflows/build-alt.yaml | 50 ++++++++++++++--------------- .github/workflows/build.yaml | 15 ++++----- .github/workflows/e2e-testing.yaml | 2 +- .github/workflows/py-unit-tests.yml | 2 +- 4 files changed, 34 insertions(+), 35 deletions(-) diff --git a/.github/workflows/build-alt.yaml b/.github/workflows/build-alt.yaml index 428176c..4befac6 100644 --- a/.github/workflows/build-alt.yaml +++ b/.github/workflows/build-alt.yaml @@ -1,11 +1,11 @@ # Docker build images on tag name: Build&Push Alt Images -on: [push] -# push: -# tags: -# - 'only-alts' -# # echo "Tag name from GITHUB_REF_NAME: $GITHUB_REF_NAME" -# # echo "Tag name from github.ref_name: ${{ github.ref_name }}" +on: + push: + tags: + - 'test-alts' +# echo "Tag name from GITHUB_REF_NAME: $GITHUB_REF_NAME" +# echo "Tag name from github.ref_name: ${{ github.ref_name }}" env: IMAGE_TAGS: ${{ github.ref_name }} @@ -39,15 +39,15 @@ jobs: sudo apt-get install -y qemu-user-static sudo apt-get install -y rustc - - name: Build alt Image armv5 - id: build_alt_imagev5 - uses: redhat-actions/buildah-build@main - with: - image: ${{ env.IMAGE_NAMESPACE }} - tags: alt-${{ env.IMAGE_TAGS }} - platforms: linux/arm/v5 - containerfiles: | - ./Dockerfile-others.gh + # - name: Build alt Image armv5 # not working + # id: build_alt_imagev5 + # uses: redhat-actions/buildah-build@main + # with: + # image: ${{ env.IMAGE_NAMESPACE }} + # tags: alt-${{ env.IMAGE_TAGS }} + # platforms: linux/arm/v5 + # containerfiles: | + # ./Dockerfile-others.gh build-push-quay-s390: name: Build&Push Alt @@ -155,16 +155,16 @@ jobs: ./Dockerfile-others.gh # Push the image manifest to Quay.io (Image Registry) - - name: Push To Quay - # uses: ./ - id: push-to-quay - uses: redhat-actions/push-to-registry@v2 - with: - image: ${{ steps.build_alt_image.outputs.image }} - tags: ${{ steps.build_alt_image.outputs.tags }} - registry: ${{ env.IMAGE_REGISTRY }}/${{ env.IMAGE_NAMESPACE }} - username: ${{ secrets.REGISTRY_USER }} - password: ${{ secrets.REGISTRY_PASSWORD }} + # - name: Push To Quay + # # uses: ./ + # id: push-to-quay + # uses: redhat-actions/push-to-registry@v2 + # with: + # image: ${{ steps.build_alt_image.outputs.image }} + # tags: ${{ steps.build_alt_image.outputs.tags }} + # registry: ${{ env.IMAGE_REGISTRY }}/${{ env.IMAGE_NAMESPACE }} + # username: ${{ secrets.REGISTRY_USER }} + # password: ${{ secrets.REGISTRY_PASSWORD }} - name: Echo outputs run: | diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index cf8287f..3fa845b 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -1,12 +1,11 @@ # Docker build images on tag name: Build&Push Images -on: [push] - -# push: -# tags: -# - '*' -# # echo "Tag name from GITHUB_REF_NAME: $GITHUB_REF_NAME" -# # echo "Tag name from github.ref_name: ${{ github.ref_name }}" +on: + push: + tags: + - '*' +# echo "Tag name from GITHUB_REF_NAME: $GITHUB_REF_NAME" +# echo "Tag name from github.ref_name: ${{ github.ref_name }}" env: IMAGE_TAGS: ${{ github.ref_name }} @@ -45,7 +44,7 @@ jobs: with: image: ${{ env.IMAGE_NAMESPACE }} tags: ${{ env.IMAGE_TAGS }} latest - platforms: linux/386, linux/amd64 + platforms: linux/386, linux/amd64, linux/s390x, linux/arm64/v8, linux/arm/v7 containerfiles: | ./Dockerfile.gh diff --git a/.github/workflows/e2e-testing.yaml b/.github/workflows/e2e-testing.yaml index d97ac6f..a0506c6 100644 --- a/.github/workflows/e2e-testing.yaml +++ b/.github/workflows/e2e-testing.yaml @@ -1,6 +1,6 @@ name: E2E Testing -on: [push, pull_request] +on: [pull_request] jobs: e2e-tests: diff --git a/.github/workflows/py-unit-tests.yml b/.github/workflows/py-unit-tests.yml index 661c498..4a1b896 100644 --- a/.github/workflows/py-unit-tests.yml +++ b/.github/workflows/py-unit-tests.yml @@ -8,7 +8,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.9", "3.10"] + python-version: ["3.9", "3.10","3.11"] steps: - uses: actions/checkout@v3 From 39ff97e33a751c312442e25f60fa14058745f387 Mon Sep 17 00:00:00 2001 From: nkowenski Date: Thu, 26 Sep 2024 00:02:09 +0200 Subject: [PATCH 11/16] run build on pull request --- .github/workflows/build.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 3fa845b..5afc1fb 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -6,7 +6,9 @@ on: - '*' # echo "Tag name from GITHUB_REF_NAME: $GITHUB_REF_NAME" # echo "Tag name from github.ref_name: ${{ github.ref_name }}" - + pull_request: + types: + - opened env: IMAGE_TAGS: ${{ github.ref_name }} REGISTRY_USER: clustersecret From ad4e4135c4dc43ca131b3cef6179cd1322f46e58 Mon Sep 17 00:00:00 2001 From: nkowenski Date: Thu, 26 Sep 2024 00:17:52 +0200 Subject: [PATCH 12/16] make a build test on pullrequest and push on tags --- .../{build-alt.yaml => build-test.yaml} | 125 +++++++++++------- .github/workflows/build.yaml | 4 +- 2 files changed, 81 insertions(+), 48 deletions(-) rename .github/workflows/{build-alt.yaml => build-test.yaml} (65%) diff --git a/.github/workflows/build-alt.yaml b/.github/workflows/build-test.yaml similarity index 65% rename from .github/workflows/build-alt.yaml rename to .github/workflows/build-test.yaml index 4befac6..c19d6b8 100644 --- a/.github/workflows/build-alt.yaml +++ b/.github/workflows/build-test.yaml @@ -1,11 +1,6 @@ # Docker build images on tag -name: Build&Push Alt Images -on: - push: - tags: - - 'test-alts' -# echo "Tag name from GITHUB_REF_NAME: $GITHUB_REF_NAME" -# echo "Tag name from github.ref_name: ${{ github.ref_name }}" +name: BuildAlt Images +on: [pull_request] env: IMAGE_TAGS: ${{ github.ref_name }} @@ -14,8 +9,8 @@ env: IMAGE_NAMESPACE : clustersecret jobs: - build-push-quay-v5: - name: Build&Push Alt + build-amd64: + name: Build amd64 runs-on: ubuntu-24.04 # strategy: # fail-fast: false @@ -37,20 +32,63 @@ jobs: run: | sudo apt-get update sudo apt-get install -y qemu-user-static - sudo apt-get install -y rustc - # - name: Build alt Image armv5 # not working - # id: build_alt_imagev5 - # uses: redhat-actions/buildah-build@main - # with: - # image: ${{ env.IMAGE_NAMESPACE }} - # tags: alt-${{ env.IMAGE_TAGS }} - # platforms: linux/arm/v5 - # containerfiles: | - # ./Dockerfile-others.gh - - build-push-quay-s390: - name: Build&Push Alt + - name: Build amd64 + id: build_image386 + uses: redhat-actions/buildah-build@main + with: + image: ${{ env.IMAGE_NAMESPACE }} + tags: ${{ env.IMAGE_TAGS }} + platforms: llinux/amd64 + containerfiles: | + ./Dockerfile.gh + + - name: Echo outputs + run: | + echo "${{ toJSON(steps.push-to-quay.outputs) }}" + + + build-386: + name: Build 386 + runs-on: ubuntu-24.04 + # strategy: + # fail-fast: false + # matrix: + # install_latest: [ true, false ] #ubuntu-20.04 has a good enough podman. + steps: + # Checkout push-to-registry action github repository + - name: Checkout Push to Registry action + uses: actions/checkout@v2 + + # - name: Install latest podman + # if: matrix.install_latest + # run: | + # bash .github/install_latest_podman.sh + + - name: Install qemu dependency + # we need quemu-user-static for builds other archs with buildah + # https://github.com/containers/podman/issues/13924#issuecomment-1103434554 + run: | + sudo apt-get update + sudo apt-get install -y qemu-user-static + + - name: Build alt Image 386 + id: build_image386 + uses: redhat-actions/buildah-build@main + with: + image: ${{ env.IMAGE_NAMESPACE }} + tags: ${{ env.IMAGE_TAGS }} + platforms: linux/386 + containerfiles: | + ./Dockerfile.gh + + - name: Echo outputs + run: | + echo "${{ toJSON(steps.push-to-quay.outputs) }}" + + + build-s390: + name: Builds 390 runs-on: ubuntu-24.04 # strategy: # fail-fast: false @@ -75,17 +113,22 @@ jobs: sudo apt-get install -y rustc - name: Build alt Image s390 - id: build_alt_image390 + id: build_image390 uses: redhat-actions/buildah-build@main with: image: ${{ env.IMAGE_NAMESPACE }} - tags: alt-${{ env.IMAGE_TAGS }} + tags: ${{ env.IMAGE_TAGS }} platforms: linux/s390x containerfiles: | - ./Dockerfile-others.gh + ./Dockerfile.gh - build-push-quay-armv8: - name: Build&Push Alt + - name: Echo outputs + run: | + echo "${{ toJSON(steps.push-to-quay.outputs) }}" + + + build-armv8: + name: Build armv8 runs-on: ubuntu-24.04 # strategy: # fail-fast: false @@ -114,13 +157,17 @@ jobs: uses: redhat-actions/buildah-build@main with: image: ${{ env.IMAGE_NAMESPACE }} - tags: alt-${{ env.IMAGE_TAGS }} + tags: ${{ env.IMAGE_TAGS }} platforms: linux/arm64/v8 containerfiles: | - ./Dockerfile-others.gh + ./Dockerfile.gh + + - name: Echo outputs + run: | + echo "${{ toJSON(steps.push-to-quay.outputs) }}" - build-push-quay-armv7: - name: Build&Push Alt + build-armv7: + name: Build armv7 runs-on: ubuntu-24.04 # strategy: # fail-fast: false @@ -149,22 +196,10 @@ jobs: uses: redhat-actions/buildah-build@main with: image: ${{ env.IMAGE_NAMESPACE }} - tags: alt-${{ env.IMAGE_TAGS }} + tags: ${{ env.IMAGE_TAGS }} platforms: linux/arm/v7 containerfiles: | - ./Dockerfile-others.gh - - # Push the image manifest to Quay.io (Image Registry) - # - name: Push To Quay - # # uses: ./ - # id: push-to-quay - # uses: redhat-actions/push-to-registry@v2 - # with: - # image: ${{ steps.build_alt_image.outputs.image }} - # tags: ${{ steps.build_alt_image.outputs.tags }} - # registry: ${{ env.IMAGE_REGISTRY }}/${{ env.IMAGE_NAMESPACE }} - # username: ${{ secrets.REGISTRY_USER }} - # password: ${{ secrets.REGISTRY_PASSWORD }} + ./Dockerfile.gh - name: Echo outputs run: | diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 5afc1fb..3fa845b 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -6,9 +6,7 @@ on: - '*' # echo "Tag name from GITHUB_REF_NAME: $GITHUB_REF_NAME" # echo "Tag name from github.ref_name: ${{ github.ref_name }}" - pull_request: - types: - - opened + env: IMAGE_TAGS: ${{ github.ref_name }} REGISTRY_USER: clustersecret From c56c979a75b34e9ed359059f59cbda7375953d28 Mon Sep 17 00:00:00 2001 From: nkowenski Date: Thu, 26 Sep 2024 00:21:59 +0200 Subject: [PATCH 13/16] fix typo on arch --- .github/workflows/build-test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-test.yaml b/.github/workflows/build-test.yaml index c19d6b8..18865d4 100644 --- a/.github/workflows/build-test.yaml +++ b/.github/workflows/build-test.yaml @@ -39,7 +39,7 @@ jobs: with: image: ${{ env.IMAGE_NAMESPACE }} tags: ${{ env.IMAGE_TAGS }} - platforms: llinux/amd64 + platforms: linux/amd64 containerfiles: | ./Dockerfile.gh From 12ed8a278559d8c850520f4350ee9a0c722cd1bf Mon Sep 17 00:00:00 2001 From: nkowenski Date: Thu, 26 Sep 2024 00:24:15 +0200 Subject: [PATCH 14/16] rename test builds --- .github/workflows/build-test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-test.yaml b/.github/workflows/build-test.yaml index 18865d4..36381c9 100644 --- a/.github/workflows/build-test.yaml +++ b/.github/workflows/build-test.yaml @@ -1,5 +1,5 @@ # Docker build images on tag -name: BuildAlt Images +name: Test Builds Images on: [pull_request] env: From a3f06d1673024a4053f45dd91a986f67ab54549e Mon Sep 17 00:00:00 2001 From: nkowenski Date: Thu, 26 Sep 2024 00:27:01 +0200 Subject: [PATCH 15/16] use docker others for v7 --- .github/workflows/build-test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-test.yaml b/.github/workflows/build-test.yaml index 36381c9..fc7ccd1 100644 --- a/.github/workflows/build-test.yaml +++ b/.github/workflows/build-test.yaml @@ -199,7 +199,7 @@ jobs: tags: ${{ env.IMAGE_TAGS }} platforms: linux/arm/v7 containerfiles: | - ./Dockerfile.gh + ./Dockerfile-others.gh - name: Echo outputs run: | From 740c5eaf73ae8027ccfa22170ccf758f26e0c9d5 Mon Sep 17 00:00:00 2001 From: nkowenski Date: Thu, 26 Sep 2024 00:40:19 +0200 Subject: [PATCH 16/16] just build v8 for arm --- .github/workflows/build-test.yaml | 2 +- .github/workflows/build.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-test.yaml b/.github/workflows/build-test.yaml index fc7ccd1..4daad7d 100644 --- a/.github/workflows/build-test.yaml +++ b/.github/workflows/build-test.yaml @@ -167,7 +167,7 @@ jobs: echo "${{ toJSON(steps.push-to-quay.outputs) }}" build-armv7: - name: Build armv7 + name: Build armv7 #note it needs build essentials (uses docker-others) runs-on: ubuntu-24.04 # strategy: # fail-fast: false diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 3fa845b..4088ab6 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -44,7 +44,7 @@ jobs: with: image: ${{ env.IMAGE_NAMESPACE }} tags: ${{ env.IMAGE_TAGS }} latest - platforms: linux/386, linux/amd64, linux/s390x, linux/arm64/v8, linux/arm/v7 + platforms: linux/386, linux/amd64, linux/s390x, linux/arm64/v8 containerfiles: | ./Dockerfile.gh