|
| 1 | +# Docker build images on tag |
| 2 | +name: Test Builds Images |
| 3 | +on: [pull_request] |
| 4 | + |
| 5 | +env: |
| 6 | + IMAGE_TAGS: ${{ github.ref_name }} |
| 7 | + REGISTRY_USER: clustersecret |
| 8 | + IMAGE_REGISTRY: quay.io |
| 9 | + IMAGE_NAMESPACE : clustersecret |
| 10 | + |
| 11 | +jobs: |
| 12 | + build-amd64: |
| 13 | + name: Build amd64 |
| 14 | + runs-on: ubuntu-24.04 |
| 15 | + # strategy: |
| 16 | + # fail-fast: false |
| 17 | + # matrix: |
| 18 | + # install_latest: [ true, false ] #ubuntu-20.04 has a good enough podman. |
| 19 | + steps: |
| 20 | + # Checkout push-to-registry action github repository |
| 21 | + - name: Checkout Push to Registry action |
| 22 | + uses: actions/checkout@v2 |
| 23 | + |
| 24 | + # - name: Install latest podman |
| 25 | + # if: matrix.install_latest |
| 26 | + # run: | |
| 27 | + # bash .github/install_latest_podman.sh |
| 28 | + |
| 29 | + - name: Install qemu dependency |
| 30 | + # we need quemu-user-static for builds other archs with buildah |
| 31 | + # https://github.com/containers/podman/issues/13924#issuecomment-1103434554 |
| 32 | + run: | |
| 33 | + sudo apt-get update |
| 34 | + sudo apt-get install -y qemu-user-static |
| 35 | +
|
| 36 | + - name: Build amd64 |
| 37 | + id: build_image386 |
| 38 | + uses: redhat-actions/buildah-build@main |
| 39 | + with: |
| 40 | + image: ${{ env.IMAGE_NAMESPACE }} |
| 41 | + tags: ${{ env.IMAGE_TAGS }} |
| 42 | + platforms: linux/amd64 |
| 43 | + containerfiles: | |
| 44 | + ./Dockerfile.gh |
| 45 | +
|
| 46 | + - name: Echo outputs |
| 47 | + run: | |
| 48 | + echo "${{ toJSON(steps.push-to-quay.outputs) }}" |
| 49 | +
|
| 50 | +
|
| 51 | + build-386: |
| 52 | + name: Build 386 |
| 53 | + runs-on: ubuntu-24.04 |
| 54 | + # strategy: |
| 55 | + # fail-fast: false |
| 56 | + # matrix: |
| 57 | + # install_latest: [ true, false ] #ubuntu-20.04 has a good enough podman. |
| 58 | + steps: |
| 59 | + # Checkout push-to-registry action github repository |
| 60 | + - name: Checkout Push to Registry action |
| 61 | + uses: actions/checkout@v2 |
| 62 | + |
| 63 | + # - name: Install latest podman |
| 64 | + # if: matrix.install_latest |
| 65 | + # run: | |
| 66 | + # bash .github/install_latest_podman.sh |
| 67 | + |
| 68 | + - name: Install qemu dependency |
| 69 | + # we need quemu-user-static for builds other archs with buildah |
| 70 | + # https://github.com/containers/podman/issues/13924#issuecomment-1103434554 |
| 71 | + run: | |
| 72 | + sudo apt-get update |
| 73 | + sudo apt-get install -y qemu-user-static |
| 74 | +
|
| 75 | + - name: Build alt Image 386 |
| 76 | + id: build_image386 |
| 77 | + uses: redhat-actions/buildah-build@main |
| 78 | + with: |
| 79 | + image: ${{ env.IMAGE_NAMESPACE }} |
| 80 | + tags: ${{ env.IMAGE_TAGS }} |
| 81 | + platforms: linux/386 |
| 82 | + containerfiles: | |
| 83 | + ./Dockerfile.gh |
| 84 | +
|
| 85 | + - name: Echo outputs |
| 86 | + run: | |
| 87 | + echo "${{ toJSON(steps.push-to-quay.outputs) }}" |
| 88 | +
|
| 89 | +
|
| 90 | + build-s390: |
| 91 | + name: Builds 390 |
| 92 | + runs-on: ubuntu-24.04 |
| 93 | + # strategy: |
| 94 | + # fail-fast: false |
| 95 | + # matrix: |
| 96 | + # install_latest: [ true, false ] #ubuntu-20.04 has a good enough podman. |
| 97 | + steps: |
| 98 | + # Checkout push-to-registry action github repository |
| 99 | + - name: Checkout Push to Registry action |
| 100 | + uses: actions/checkout@v2 |
| 101 | + |
| 102 | + # - name: Install latest podman |
| 103 | + # if: matrix.install_latest |
| 104 | + # run: | |
| 105 | + # bash .github/install_latest_podman.sh |
| 106 | + |
| 107 | + - name: Install qemu dependency |
| 108 | + # we need quemu-user-static for builds other archs with buildah |
| 109 | + # https://github.com/containers/podman/issues/13924#issuecomment-1103434554 |
| 110 | + run: | |
| 111 | + sudo apt-get update |
| 112 | + sudo apt-get install -y qemu-user-static |
| 113 | + sudo apt-get install -y rustc |
| 114 | +
|
| 115 | + - name: Build alt Image s390 |
| 116 | + id: build_image390 |
| 117 | + uses: redhat-actions/buildah-build@main |
| 118 | + with: |
| 119 | + image: ${{ env.IMAGE_NAMESPACE }} |
| 120 | + tags: ${{ env.IMAGE_TAGS }} |
| 121 | + platforms: linux/s390x |
| 122 | + containerfiles: | |
| 123 | + ./Dockerfile.gh |
| 124 | +
|
| 125 | + - name: Echo outputs |
| 126 | + run: | |
| 127 | + echo "${{ toJSON(steps.push-to-quay.outputs) }}" |
| 128 | +
|
| 129 | +
|
| 130 | + build-armv8: |
| 131 | + name: Build armv8 |
| 132 | + runs-on: ubuntu-24.04 |
| 133 | + # strategy: |
| 134 | + # fail-fast: false |
| 135 | + # matrix: |
| 136 | + # install_latest: [ true, false ] #ubuntu-20.04 has a good enough podman. |
| 137 | + steps: |
| 138 | + # Checkout push-to-registry action github repository |
| 139 | + - name: Checkout Push to Registry action |
| 140 | + uses: actions/checkout@v2 |
| 141 | + |
| 142 | + # - name: Install latest podman |
| 143 | + # if: matrix.install_latest |
| 144 | + # run: | |
| 145 | + # bash .github/install_latest_podman.sh |
| 146 | + |
| 147 | + - name: Install qemu dependency |
| 148 | + # we need quemu-user-static for builds other archs with buildah |
| 149 | + # https://github.com/containers/podman/issues/13924#issuecomment-1103434554 |
| 150 | + run: | |
| 151 | + sudo apt-get update |
| 152 | + sudo apt-get install -y qemu-user-static |
| 153 | + sudo apt-get install -y rustc |
| 154 | +
|
| 155 | + - name: Build alt Image armv8 |
| 156 | + id: build_alt_imagev8 |
| 157 | + uses: redhat-actions/buildah-build@main |
| 158 | + with: |
| 159 | + image: ${{ env.IMAGE_NAMESPACE }} |
| 160 | + tags: ${{ env.IMAGE_TAGS }} |
| 161 | + platforms: linux/arm64/v8 |
| 162 | + containerfiles: | |
| 163 | + ./Dockerfile.gh |
| 164 | +
|
| 165 | + - name: Echo outputs |
| 166 | + run: | |
| 167 | + echo "${{ toJSON(steps.push-to-quay.outputs) }}" |
| 168 | +
|
| 169 | + build-armv7: |
| 170 | + name: Build armv7 #note it needs build essentials (uses docker-others) |
| 171 | + runs-on: ubuntu-24.04 |
| 172 | + # strategy: |
| 173 | + # fail-fast: false |
| 174 | + # matrix: |
| 175 | + # install_latest: [ true, false ] #ubuntu-20.04 has a good enough podman. |
| 176 | + steps: |
| 177 | + # Checkout push-to-registry action github repository |
| 178 | + - name: Checkout Push to Registry action |
| 179 | + uses: actions/checkout@v2 |
| 180 | + |
| 181 | + # - name: Install latest podman |
| 182 | + # if: matrix.install_latest |
| 183 | + # run: | |
| 184 | + # bash .github/install_latest_podman.sh |
| 185 | + |
| 186 | + - name: Install qemu dependency |
| 187 | + # we need quemu-user-static for builds other archs with buildah |
| 188 | + # https://github.com/containers/podman/issues/13924#issuecomment-1103434554 |
| 189 | + run: | |
| 190 | + sudo apt-get update |
| 191 | + sudo apt-get install -y qemu-user-static |
| 192 | + sudo apt-get install -y rustc |
| 193 | +
|
| 194 | + - name: Build alt Image armv7 |
| 195 | + id: build_alt_imagev7 |
| 196 | + uses: redhat-actions/buildah-build@main |
| 197 | + with: |
| 198 | + image: ${{ env.IMAGE_NAMESPACE }} |
| 199 | + tags: ${{ env.IMAGE_TAGS }} |
| 200 | + platforms: linux/arm/v7 |
| 201 | + containerfiles: | |
| 202 | + ./Dockerfile-others.gh |
| 203 | +
|
| 204 | + - name: Echo outputs |
| 205 | + run: | |
| 206 | + echo "${{ toJSON(steps.push-to-quay.outputs) }}" |
0 commit comments