@@ -398,8 +398,8 @@ jobs:
398
398
if : github.event_name != 'schedule'
399
399
outputs :
400
400
typ : ${{ steps.prep.outputs.typ }}
401
- tag : ${{ steps.prep.outputs.tag }}
402
401
push : ${{ steps.prep.outputs.push }}
402
+ matrix : ${{ steps.prep.outputs.matrix }}
403
403
steps :
404
404
-
405
405
name : Prepare
@@ -416,14 +416,30 @@ jobs:
416
416
PUSH=push
417
417
fi
418
418
echo "typ=${TYP}" >>${GITHUB_OUTPUT}
419
- echo "tag=${TAG}" >>${GITHUB_OUTPUT}
420
419
echo "push=${PUSH}" >>${GITHUB_OUTPUT}
420
+ if [ "${TYP}" = "master" ]; then
421
+ echo "matrix=$(jq -cn --arg tag "$TAG" '[$tag, "labs"]')" >>${GITHUB_OUTPUT}
422
+ else
423
+ echo "matrix=$(jq -cn --arg tag "$TAG" '[$tag]')" >>${GITHUB_OUTPUT}
424
+ fi
421
425
422
426
frontend-image :
423
427
runs-on : ubuntu-20.04
424
428
if : github.event_name != 'schedule'
425
429
needs : [frontend-base, test]
430
+ strategy :
431
+ fail-fast : false
432
+ matrix :
433
+ tag : ${{ fromJson(needs.frontend-base.outputs.matrix) }}
426
434
steps :
435
+ -
436
+ name : Prepare
437
+ run : |
438
+ if [ "${{ matrix.tag }}" = "labs" ]; then
439
+ echo "CACHE_SCOPE=frontend-labs" >>${GITHUB_ENV}
440
+ else
441
+ echo "CACHE_SCOPE=frontend-mainline" >>${GITHUB_ENV}
442
+ fi
427
443
-
428
444
name : Checkout
429
445
uses : actions/checkout@v3
@@ -448,18 +464,10 @@ jobs:
448
464
username : ${{ secrets.DOCKERHUB_USERNAME }}
449
465
password : ${{ secrets.DOCKERHUB_TOKEN }}
450
466
-
451
- name : Build ${{ needs.frontend-base.outputs.typ }}/${{ needs.frontend-base.outputs.tag }}
452
- run : |
453
- ./frontend/dockerfile/cmd/dockerfile-frontend/hack/release "${{ needs.frontend-base.outputs.typ }}" "${{ needs.frontend-base.outputs.tag }}" "$DF_REPO_SLUG_TARGET" "${{ needs.frontend-base.outputs.push }}"
454
- env :
455
- PLATFORMS : ${{ env.PLATFORMS }},linux/386,linux/mips,linux/mipsle,linux/mips64,linux/mips64le
456
- CACHE_FROM : type=gha,scope=frontend-${{ needs.frontend-base.outputs.typ }}
457
- CACHE_TO : type=gha,scope=frontend-${{ needs.frontend-base.outputs.typ }}
458
- -
459
- name : Build ${{ needs.frontend-base.outputs.typ }}/labs
460
- if : needs.frontend-base.outputs.typ == 'master'
467
+ name : Build
461
468
run : |
462
- ./frontend/dockerfile/cmd/dockerfile-frontend/hack/release "${{ needs.frontend-base.outputs.typ }}" labs "$DF_REPO_SLUG_TARGET" "${{ needs.frontend-base.outputs.push }}"
469
+ ./frontend/dockerfile/cmd/dockerfile-frontend/hack/release "${{ needs.frontend-base.outputs.typ }}" "${{ matrix.tag }}" "$DF_REPO_SLUG_TARGET" "${{ needs.frontend-base.outputs.push }}"
463
470
env :
464
471
PLATFORMS : ${{ env.PLATFORMS }},linux/386,linux/mips,linux/mipsle,linux/mips64,linux/mips64le
465
- CACHE_FROM : type=gha,scope=frontend-${{ needs.frontend-base.outputs.typ }}
472
+ CACHE_FROM : type=gha,scope=${{ env.CACHE_SCOPE }}
473
+ CACHE_TO : type=gha,scope=${{ env.CACHE_SCOPE }}
0 commit comments