@@ -444,8 +444,8 @@ jobs:
444
444
if : github.event_name != 'schedule'
445
445
outputs :
446
446
typ : ${{ steps.prep.outputs.typ }}
447
- tag : ${{ steps.prep.outputs.tag }}
448
447
push : ${{ steps.prep.outputs.push }}
448
+ matrix : ${{ steps.prep.outputs.matrix }}
449
449
steps :
450
450
-
451
451
name : Prepare
@@ -462,14 +462,30 @@ jobs:
462
462
PUSH=push
463
463
fi
464
464
echo "typ=${TYP}" >>${GITHUB_OUTPUT}
465
- echo "tag=${TAG}" >>${GITHUB_OUTPUT}
466
465
echo "push=${PUSH}" >>${GITHUB_OUTPUT}
466
+ if [ "${TYP}" = "master" ]; then
467
+ echo "matrix=$(jq -cn --arg tag "$TAG" '[$tag, "labs"]')" >>${GITHUB_OUTPUT}
468
+ else
469
+ echo "matrix=$(jq -cn --arg tag "$TAG" '[$tag]')" >>${GITHUB_OUTPUT}
470
+ fi
467
471
468
472
frontend-image :
469
473
runs-on : ubuntu-20.04
470
474
if : github.event_name != 'schedule'
471
475
needs : [frontend-base, test]
476
+ strategy :
477
+ fail-fast : false
478
+ matrix :
479
+ tag : ${{ fromJson(needs.frontend-base.outputs.matrix) }}
472
480
steps :
481
+ -
482
+ name : Prepare
483
+ run : |
484
+ if [ "${{ matrix.tag }}" = "labs" ]; then
485
+ echo "CACHE_SCOPE=frontend-labs" >>${GITHUB_ENV}
486
+ else
487
+ echo "CACHE_SCOPE=frontend-mainline" >>${GITHUB_ENV}
488
+ fi
473
489
-
474
490
name : Checkout
475
491
uses : actions/checkout@v3
@@ -494,18 +510,10 @@ jobs:
494
510
username : ${{ secrets.DOCKERHUB_USERNAME }}
495
511
password : ${{ secrets.DOCKERHUB_TOKEN }}
496
512
-
497
- name : Build ${{ needs.frontend-base.outputs.typ }}/${{ needs.frontend-base.outputs.tag }}
498
- run : |
499
- ./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 }}"
500
- env :
501
- PLATFORMS : ${{ env.PLATFORMS }},linux/386,linux/mips,linux/mipsle,linux/mips64,linux/mips64le
502
- CACHE_FROM : type=gha,scope=frontend-${{ needs.frontend-base.outputs.typ }}
503
- CACHE_TO : type=gha,scope=frontend-${{ needs.frontend-base.outputs.typ }}
504
- -
505
- name : Build ${{ needs.frontend-base.outputs.typ }}/labs
506
- if : needs.frontend-base.outputs.typ == 'master'
513
+ name : Build
507
514
run : |
508
- ./frontend/dockerfile/cmd/dockerfile-frontend/hack/release "${{ needs.frontend-base.outputs.typ }}" labs "$DF_REPO_SLUG_TARGET" "${{ needs.frontend-base.outputs.push }}"
515
+ ./frontend/dockerfile/cmd/dockerfile-frontend/hack/release "${{ needs.frontend-base.outputs.typ }}" "${{ matrix.tag }}" "$DF_REPO_SLUG_TARGET" "${{ needs.frontend-base.outputs.push }}"
509
516
env :
510
517
PLATFORMS : ${{ env.PLATFORMS }},linux/386,linux/mips,linux/mipsle,linux/mips64,linux/mips64le
511
- CACHE_FROM : type=gha,scope=frontend-${{ needs.frontend-base.outputs.typ }}
518
+ CACHE_FROM : type=gha,scope=${{ env.CACHE_SCOPE }}
519
+ CACHE_TO : type=gha,scope=${{ env.CACHE_SCOPE }}
0 commit comments