@@ -6,14 +6,13 @@ concurrency:
6
6
7
7
on :
8
8
schedule :
9
- - cron : ' 0 10 * * *' # everyday at 10am
9
+ - cron : ' 0 10 * * *'
10
10
workflow_dispatch :
11
11
push :
12
12
branches :
13
13
- ' master'
14
14
tags :
15
15
- ' v*'
16
- - ' dockerfile/*'
17
16
pull_request :
18
17
paths-ignore :
19
18
- ' README.md'
23
22
env :
24
23
REPO_SLUG_ORIGIN : " moby/buildkit:latest"
25
24
REPO_SLUG_TARGET : " moby/buildkit"
26
- DF_REPO_SLUG_TARGET : " docker/dockerfile-upstream"
27
25
PLATFORMS : " linux/amd64,linux/arm/v7,linux/arm64,linux/s390x,linux/ppc64le,linux/riscv64"
28
- CACHE_GHA_SCOPE_IT : " integration-tests"
26
+ CACHE_GHA_SCOPE_IT : " build- integration-tests"
29
27
CACHE_GHA_SCOPE_BINARIES : " binaries"
30
28
CACHE_GHA_SCOPE_CROSS : " cross"
31
29
TESTFLAGS : " -v --parallel=6 --timeout=30m"
@@ -69,13 +67,13 @@ jobs:
69
67
70
68
test :
71
69
runs-on : ubuntu-20.04
72
- needs : [base]
70
+ needs :
71
+ - base
73
72
strategy :
74
73
fail-fast : false
75
74
matrix :
76
75
pkg :
77
76
- ./client ./cmd/buildctl ./worker/containerd ./solver ./frontend
78
- - ./frontend/dockerfile
79
77
worker :
80
78
- containerd
81
79
- containerd-rootless
86
84
- oci-snapshotter-stargz
87
85
typ :
88
86
- integration
89
- - dockerfile
90
87
tags :
91
88
- ' '
92
- exclude :
93
- - pkg : ./client ./cmd/buildctl ./worker/containerd ./solver ./frontend
94
- typ : dockerfile
95
89
include :
96
90
- pkg : ./...
97
91
skip-integration-tests : 1
@@ -142,7 +136,7 @@ jobs:
142
136
TEST_COVERAGE : 1
143
137
TESTPKGS : ${{ matrix.pkg }}
144
138
SKIP_INTEGRATION_TESTS : ${{ matrix.skip-integration-tests }}
145
- CACHE_FROM : type=gha,scope=${{ env.CACHE_GHA_SCOPE_IT }} type=gha,scope=${{ env.CACHE_GHA_SCOPE_BINARIES }}
139
+ CACHE_FROM : type=gha,scope=${{ env.CACHE_GHA_SCOPE_IT }}
146
140
-
147
141
name : Upload coverage file
148
142
continue-on-error : ${{ matrix.tags == 'nydus' }}
@@ -192,7 +186,9 @@ jobs:
192
186
193
187
upload-coverage :
194
188
runs-on : ubuntu-20.04
195
- needs : [test, test-os]
189
+ needs :
190
+ - test
191
+ - test-os
196
192
steps :
197
193
-
198
194
name : Checkout
@@ -275,7 +271,10 @@ jobs:
275
271
276
272
image :
277
273
runs-on : ubuntu-20.04
278
- needs : [release-base, test, cross]
274
+ needs :
275
+ - release-base
276
+ - test
277
+ - cross
279
278
strategy :
280
279
fail-fast : false
281
280
matrix :
@@ -318,7 +317,10 @@ jobs:
318
317
319
318
binaries :
320
319
runs-on : ubuntu-20.04
321
- needs : [release-base, test, cross]
320
+ needs :
321
+ - release-base
322
+ - test
323
+ - cross
322
324
steps :
323
325
-
324
326
name : Checkout
@@ -361,83 +363,3 @@ jobs:
361
363
draft : true
362
364
files : ./release-out/*
363
365
name : ${{ needs.release-base.outputs.tag }}
364
-
365
- frontend-base :
366
- runs-on : ubuntu-20.04
367
- if : github.event_name != 'schedule'
368
- outputs :
369
- typ : ${{ steps.prep.outputs.typ }}
370
- push : ${{ steps.prep.outputs.push }}
371
- matrix : ${{ steps.prep.outputs.matrix }}
372
- steps :
373
- -
374
- name : Prepare
375
- id : prep
376
- run : |
377
- TYP=master
378
- TAG=mainline
379
- PUSH=false
380
- if [[ $GITHUB_REF == refs/tags/dockerfile/* ]]; then
381
- TYP=tag
382
- TAG=${GITHUB_REF#refs/tags/}
383
- PUSH=push
384
- elif [[ $GITHUB_REF == refs/heads/* ]]; then
385
- PUSH=push
386
- fi
387
- echo "typ=${TYP}" >>${GITHUB_OUTPUT}
388
- echo "push=${PUSH}" >>${GITHUB_OUTPUT}
389
- if [ "${TYP}" = "master" ]; then
390
- echo "matrix=$(jq -cn --arg tag "$TAG" '[$tag, "labs"]')" >>${GITHUB_OUTPUT}
391
- else
392
- echo "matrix=$(jq -cn --arg tag "$TAG" '[$tag]')" >>${GITHUB_OUTPUT}
393
- fi
394
-
395
- frontend-image :
396
- runs-on : ubuntu-20.04
397
- if : github.event_name != 'schedule'
398
- needs : [frontend-base, test]
399
- strategy :
400
- fail-fast : false
401
- matrix :
402
- tag : ${{ fromJson(needs.frontend-base.outputs.matrix) }}
403
- steps :
404
- -
405
- name : Prepare
406
- run : |
407
- if [ "${{ matrix.tag }}" = "labs" ]; then
408
- echo "CACHE_SCOPE=frontend-labs" >>${GITHUB_ENV}
409
- else
410
- echo "CACHE_SCOPE=frontend-mainline" >>${GITHUB_ENV}
411
- fi
412
- -
413
- name : Checkout
414
- uses : actions/checkout@v3
415
- -
416
- name : Expose GitHub Runtime
417
- uses : crazy-max/ghaction-github-runtime@v2
418
- -
419
- name : Set up QEMU
420
- uses : docker/setup-qemu-action@v2
421
- -
422
- name : Set up Docker Buildx
423
- uses : docker/setup-buildx-action@v2
424
- with :
425
- version : ${{ env.BUILDX_VERSION }}
426
- driver-opts : image=${{ env.REPO_SLUG_ORIGIN }}
427
- buildkitd-flags : --debug
428
- -
429
- name : Login to DockerHub
430
- uses : docker/login-action@v2
431
- if : needs.frontend-base.outputs.push == 'push'
432
- with :
433
- username : ${{ secrets.DOCKERHUB_USERNAME }}
434
- password : ${{ secrets.DOCKERHUB_TOKEN }}
435
- -
436
- name : Build
437
- run : |
438
- ./frontend/dockerfile/cmd/dockerfile-frontend/hack/release "${{ needs.frontend-base.outputs.typ }}" "${{ matrix.tag }}" "$DF_REPO_SLUG_TARGET" "${{ needs.frontend-base.outputs.push }}"
439
- env :
440
- RELEASE : ${{ startsWith(github.ref, 'refs/tags/v') }}
441
- PLATFORMS : ${{ env.PLATFORMS }},linux/386,linux/mips,linux/mipsle,linux/mips64,linux/mips64le
442
- CACHE_FROM : type=gha,scope=${{ env.CACHE_SCOPE }}
443
- CACHE_TO : type=gha,scope=${{ env.CACHE_SCOPE }}
0 commit comments