|
| 1 | +name: Backfill 3.x, 4.x, or 5.x Docker Images |
| 2 | +on: |
| 3 | + workflow_dispatch: |
| 4 | + inputs: |
| 5 | + tag: |
| 6 | + type: string |
| 7 | + required: true |
| 8 | +concurrency: |
| 9 | + group: push-backfill-${{ github.ref }}-${{ inputs.tag && inputs.tag }} |
| 10 | + cancel-in-progress: true |
| 11 | +jobs: |
| 12 | + check-version: |
| 13 | + runs-on: ubuntu-latest |
| 14 | + outputs: |
| 15 | + use-crayfish: ${{ steps.compare.outputs.use-crayfish }} |
| 16 | + steps: |
| 17 | + - id: compare |
| 18 | + run: | |
| 19 | + TAG="${{ inputs.tag }}" |
| 20 | + # Strip 'v' prefix if present |
| 21 | + VERSION="${TAG#v}" |
| 22 | + IFS='.' read -r MAJOR MINOR PATCH <<< "$VERSION" |
| 23 | +
|
| 24 | + # Compare: use crayfish if version < 4.1.3 |
| 25 | + if [ "$MAJOR" -lt 4 ]; then |
| 26 | + USE_CRAYFISH=true |
| 27 | + elif [ "$MAJOR" -eq 4 ] && [ "$MINOR" -lt 1 ]; then |
| 28 | + USE_CRAYFISH=true |
| 29 | + elif [ "$MAJOR" -eq 4 ] && [ "$MINOR" -eq 1 ] && [ "$PATCH" -lt 3 ]; then |
| 30 | + USE_CRAYFISH=true |
| 31 | + else |
| 32 | + USE_CRAYFISH=false |
| 33 | + fi |
| 34 | +
|
| 35 | + echo "use-crayfish=$USE_CRAYFISH" >> $GITHUB_OUTPUT |
| 36 | + tags: |
| 37 | + uses: ./.github/workflows/tags.yml |
| 38 | + with: |
| 39 | + # Use tag from workflow_dispatch OR push event |
| 40 | + tag: ${{ inputs.tag }} |
| 41 | + secrets: inherit |
| 42 | + base: |
| 43 | + uses: ./.github/workflows/build.yml |
| 44 | + with: |
| 45 | + image: base |
| 46 | + repository: ${{ vars.repository }} |
| 47 | + tags: ${{ needs.tags.outputs.tags }} |
| 48 | + strip-apk-pinning: true |
| 49 | + secrets: inherit |
| 50 | + permissions: |
| 51 | + contents: read |
| 52 | + packages: write |
| 53 | + needs: tags |
| 54 | + activemq: |
| 55 | + uses: ./.github/workflows/build.yml |
| 56 | + with: |
| 57 | + contexts: ${{ needs.java.outputs.context }} |
| 58 | + image: activemq |
| 59 | + repository: ${{ vars.repository }} |
| 60 | + tags: ${{ needs.tags.outputs.tags }} |
| 61 | + strip-apk-pinning: true |
| 62 | + secrets: inherit |
| 63 | + permissions: |
| 64 | + contents: read |
| 65 | + packages: write |
| 66 | + needs: [tags, java] |
| 67 | + alpaca: |
| 68 | + uses: ./.github/workflows/build.yml |
| 69 | + with: |
| 70 | + contexts: ${{ needs.java.outputs.context }} |
| 71 | + image: alpaca |
| 72 | + repository: ${{ vars.repository }} |
| 73 | + tags: ${{ needs.tags.outputs.tags }} |
| 74 | + strip-apk-pinning: true |
| 75 | + secrets: inherit |
| 76 | + permissions: |
| 77 | + contents: read |
| 78 | + packages: write |
| 79 | + needs: [tags, java] |
| 80 | + blazegraph: |
| 81 | + uses: ./.github/workflows/build.yml |
| 82 | + with: |
| 83 | + contexts: ${{ needs.tomcat.outputs.context }} |
| 84 | + image: blazegraph |
| 85 | + repository: ${{ vars.repository }} |
| 86 | + tags: ${{ needs.tags.outputs.tags }} |
| 87 | + strip-apk-pinning: true |
| 88 | + secrets: inherit |
| 89 | + permissions: |
| 90 | + contents: read |
| 91 | + packages: write |
| 92 | + needs: [tags, tomcat] |
| 93 | + cantaloupe: |
| 94 | + uses: ./.github/workflows/build.yml |
| 95 | + with: |
| 96 | + contexts: ${{ needs.java.outputs.context }} |
| 97 | + image: cantaloupe |
| 98 | + repository: ${{ vars.repository }} |
| 99 | + tags: ${{ needs.tags.outputs.tags }} |
| 100 | + strip-apk-pinning: true |
| 101 | + secrets: inherit |
| 102 | + permissions: |
| 103 | + contents: read |
| 104 | + packages: write |
| 105 | + needs: [tags, java] |
| 106 | + crayfish: |
| 107 | + uses: ./.github/workflows/build.yml |
| 108 | + with: |
| 109 | + contexts: ${{ needs.nginx.outputs.context }} |
| 110 | + image: crayfish |
| 111 | + repository: ${{ vars.repository }} |
| 112 | + tags: ${{ needs.tags.outputs.tags }} |
| 113 | + strip-apk-pinning: true |
| 114 | + secrets: inherit |
| 115 | + permissions: |
| 116 | + contents: read |
| 117 | + packages: write |
| 118 | + needs: [tags, nginx] |
| 119 | + crayfits: |
| 120 | + uses: ./.github/workflows/build.yml |
| 121 | + with: |
| 122 | + contexts: ${{ needs.crayfish.outputs.context }} |
| 123 | + image: crayfits |
| 124 | + repository: ${{ vars.repository }} |
| 125 | + tags: ${{ needs.tags.outputs.tags }} |
| 126 | + strip-apk-pinning: true |
| 127 | + secrets: inherit |
| 128 | + permissions: |
| 129 | + contents: read |
| 130 | + packages: write |
| 131 | + needs: [tags, crayfish] |
| 132 | + drupal: |
| 133 | + uses: ./.github/workflows/build.yml |
| 134 | + with: |
| 135 | + contexts: ${{ needs.nginx.outputs.context }} |
| 136 | + image: drupal |
| 137 | + repository: ${{ vars.repository }} |
| 138 | + tags: ${{ needs.tags.outputs.tags }} |
| 139 | + strip-apk-pinning: true |
| 140 | + secrets: inherit |
| 141 | + permissions: |
| 142 | + contents: read |
| 143 | + packages: write |
| 144 | + needs: [tags, nginx] |
| 145 | + fcrepo6: |
| 146 | + uses: ./.github/workflows/build.yml |
| 147 | + with: |
| 148 | + contexts: ${{ needs.tomcat.outputs.context }} |
| 149 | + image: fcrepo6 |
| 150 | + repository: ${{ vars.repository }} |
| 151 | + tags: ${{ needs.tags.outputs.tags }} |
| 152 | + strip-apk-pinning: true |
| 153 | + secrets: inherit |
| 154 | + permissions: |
| 155 | + contents: read |
| 156 | + packages: write |
| 157 | + needs: [tags, tomcat] |
| 158 | + fits: |
| 159 | + uses: ./.github/workflows/build.yml |
| 160 | + with: |
| 161 | + contexts: ${{ needs.tomcat.outputs.context }} |
| 162 | + image: fits |
| 163 | + repository: ${{ vars.repository }} |
| 164 | + tags: ${{ needs.tags.outputs.tags }} |
| 165 | + strip-apk-pinning: true |
| 166 | + secrets: inherit |
| 167 | + permissions: |
| 168 | + contents: read |
| 169 | + packages: write |
| 170 | + needs: [tags, tomcat] |
| 171 | + handle: |
| 172 | + uses: ./.github/workflows/build.yml |
| 173 | + with: |
| 174 | + contexts: ${{ needs.java.outputs.context }} |
| 175 | + image: handle |
| 176 | + repository: ${{ vars.repository }} |
| 177 | + tags: ${{ needs.tags.outputs.tags }} |
| 178 | + strip-apk-pinning: true |
| 179 | + secrets: inherit |
| 180 | + permissions: |
| 181 | + contents: read |
| 182 | + packages: write |
| 183 | + needs: [tags, java] |
| 184 | + homarus: |
| 185 | + uses: ./.github/workflows/build.yml |
| 186 | + with: |
| 187 | + contexts: ${{ needs.crayfish.outputs.context }} |
| 188 | + image: homarus |
| 189 | + repository: ${{ vars.repository }} |
| 190 | + tags: ${{ needs.tags.outputs.tags }} |
| 191 | + strip-apk-pinning: true |
| 192 | + secrets: inherit |
| 193 | + permissions: |
| 194 | + contents: read |
| 195 | + packages: write |
| 196 | + needs: [tags, crayfish] |
| 197 | + houdini: |
| 198 | + if: always() |
| 199 | + uses: ./.github/workflows/build.yml |
| 200 | + with: |
| 201 | + contexts: ${{ needs.crayfish.outputs.context }} |
| 202 | + image: houdini |
| 203 | + repository: ${{ vars.repository }} |
| 204 | + tags: ${{ needs.tags.outputs.tags }} |
| 205 | + strip-apk-pinning: true |
| 206 | + secrets: inherit |
| 207 | + permissions: |
| 208 | + contents: read |
| 209 | + packages: write |
| 210 | + needs: [tags, crayfish, imagemagick] |
| 211 | + hypercube: |
| 212 | + if: always() |
| 213 | + uses: ./.github/workflows/build.yml |
| 214 | + with: |
| 215 | + contexts: ${{ needs.crayfish.outputs.context }} |
| 216 | + image: hypercube |
| 217 | + repository: ${{ vars.repository }} |
| 218 | + tags: ${{ needs.tags.outputs.tags }} |
| 219 | + strip-apk-pinning: true |
| 220 | + secrets: inherit |
| 221 | + permissions: |
| 222 | + contents: read |
| 223 | + packages: write |
| 224 | + needs: [tags, crayfish, leptonica] |
| 225 | + imagemagick: |
| 226 | + if: ${{ needs.check-version.outputs.use-crayfish == 'true' }} |
| 227 | + uses: ./.github/workflows/build.yml |
| 228 | + with: |
| 229 | + contexts: ${{ needs.base.outputs.context }} |
| 230 | + image: imagemagick |
| 231 | + repository: ${{ vars.repository }} |
| 232 | + tags: ${{ needs.tags.outputs.tags }} |
| 233 | + strip-apk-pinning: true |
| 234 | + secrets: inherit |
| 235 | + permissions: |
| 236 | + contents: read |
| 237 | + packages: write |
| 238 | + needs: [tags, base, check-version] |
| 239 | + java: |
| 240 | + uses: ./.github/workflows/build.yml |
| 241 | + with: |
| 242 | + contexts: ${{ needs.base.outputs.context }} |
| 243 | + image: java |
| 244 | + repository: ${{ vars.repository }} |
| 245 | + tags: ${{ needs.tags.outputs.tags }} |
| 246 | + strip-apk-pinning: true |
| 247 | + secrets: inherit |
| 248 | + permissions: |
| 249 | + contents: read |
| 250 | + packages: write |
| 251 | + needs: [tags, base] |
| 252 | + leptonica: |
| 253 | + if: ${{ needs.check-version.outputs.use-crayfish == 'true' }} |
| 254 | + uses: ./.github/workflows/build.yml |
| 255 | + with: |
| 256 | + contexts: ${{ needs.base.outputs.context }} |
| 257 | + image: leptonica |
| 258 | + repository: ${{ vars.repository }} |
| 259 | + tags: ${{ needs.tags.outputs.tags }} |
| 260 | + strip-apk-pinning: true |
| 261 | + secrets: inherit |
| 262 | + permissions: |
| 263 | + contents: read |
| 264 | + packages: write |
| 265 | + needs: [tags, base, check-version] |
| 266 | + mariadb: |
| 267 | + uses: ./.github/workflows/build.yml |
| 268 | + with: |
| 269 | + contexts: ${{ needs.base.outputs.context }} |
| 270 | + image: mariadb |
| 271 | + repository: ${{ vars.repository }} |
| 272 | + tags: ${{ needs.tags.outputs.tags }} |
| 273 | + strip-apk-pinning: true |
| 274 | + secrets: inherit |
| 275 | + permissions: |
| 276 | + contents: read |
| 277 | + packages: write |
| 278 | + needs: [tags, base] |
| 279 | + milliner: |
| 280 | + uses: ./.github/workflows/build.yml |
| 281 | + with: |
| 282 | + contexts: ${{ needs.crayfish.outputs.context }} |
| 283 | + image: milliner |
| 284 | + repository: ${{ vars.repository }} |
| 285 | + tags: ${{ needs.tags.outputs.tags }} |
| 286 | + strip-apk-pinning: true |
| 287 | + secrets: inherit |
| 288 | + permissions: |
| 289 | + contents: read |
| 290 | + packages: write |
| 291 | + needs: [tags, crayfish] |
| 292 | + nginx: |
| 293 | + uses: ./.github/workflows/build.yml |
| 294 | + with: |
| 295 | + contexts: ${{ needs.base.outputs.context }} |
| 296 | + image: nginx |
| 297 | + repository: ${{ vars.repository }} |
| 298 | + tags: ${{ needs.tags.outputs.tags }} |
| 299 | + strip-apk-pinning: true |
| 300 | + secrets: inherit |
| 301 | + permissions: |
| 302 | + contents: read |
| 303 | + packages: write |
| 304 | + needs: [tags, base] |
| 305 | + postgresql: |
| 306 | + uses: ./.github/workflows/build.yml |
| 307 | + with: |
| 308 | + contexts: ${{ needs.base.outputs.context }} |
| 309 | + image: postgresql |
| 310 | + repository: ${{ vars.repository }} |
| 311 | + tags: ${{ needs.tags.outputs.tags }} |
| 312 | + strip-apk-pinning: true |
| 313 | + secrets: inherit |
| 314 | + permissions: |
| 315 | + contents: read |
| 316 | + packages: write |
| 317 | + needs: [tags, base] |
| 318 | + riprap: |
| 319 | + uses: ./.github/workflows/build.yml |
| 320 | + with: |
| 321 | + contexts: ${{ needs.nginx.outputs.context }} |
| 322 | + image: riprap |
| 323 | + repository: ${{ vars.repository }} |
| 324 | + tags: ${{ needs.tags.outputs.tags }} |
| 325 | + strip-apk-pinning: true |
| 326 | + secrets: inherit |
| 327 | + permissions: |
| 328 | + contents: read |
| 329 | + packages: write |
| 330 | + needs: [tags, nginx] |
| 331 | + solr: |
| 332 | + uses: ./.github/workflows/build.yml |
| 333 | + with: |
| 334 | + contexts: ${{ needs.java.outputs.context }} |
| 335 | + image: solr |
| 336 | + repository: ${{ vars.repository }} |
| 337 | + tags: ${{ needs.tags.outputs.tags }} |
| 338 | + strip-apk-pinning: true |
| 339 | + secrets: inherit |
| 340 | + permissions: |
| 341 | + contents: read |
| 342 | + packages: write |
| 343 | + needs: [tags, java] |
| 344 | + tomcat: |
| 345 | + uses: ./.github/workflows/build.yml |
| 346 | + with: |
| 347 | + contexts: ${{ needs.java.outputs.context }} |
| 348 | + image: tomcat |
| 349 | + repository: ${{ vars.repository }} |
| 350 | + tags: ${{ needs.tags.outputs.tags }} |
| 351 | + strip-apk-pinning: true |
| 352 | + secrets: inherit |
| 353 | + permissions: |
| 354 | + contents: read |
| 355 | + packages: write |
| 356 | + needs: [tags, java] |
| 357 | + codeserver: |
| 358 | + if: ${{ startsWith(inputs.tag, '3.') || startsWith(inputs.tag, '4.') }} |
| 359 | + uses: ./.github/workflows/build.yml |
| 360 | + with: |
| 361 | + contexts: ${{ needs.drupal.outputs.context }} |
| 362 | + image: codeserver |
| 363 | + repository: ${{ vars.repository }} |
| 364 | + tags: ${{ needs.tags.outputs.tags }} |
| 365 | + strip-apk-pinning: true |
| 366 | + secrets: inherit |
| 367 | + permissions: |
| 368 | + contents: read |
| 369 | + packages: write |
| 370 | + needs: [tags, drupal] |
| 371 | + matomo: |
| 372 | + if: ${{ startsWith(inputs.tag, '3.') }} |
| 373 | + uses: ./.github/workflows/build.yml |
| 374 | + with: |
| 375 | + contexts: ${{ needs.nginx.outputs.context }} |
| 376 | + image: matomo |
| 377 | + repository: ${{ vars.repository }} |
| 378 | + tags: ${{ needs.tags.outputs.tags }} |
| 379 | + strip-apk-pinning: true |
| 380 | + secrets: inherit |
| 381 | + permissions: |
| 382 | + contents: read |
| 383 | + packages: write |
| 384 | + needs: [tags, nginx] |
0 commit comments