1+ name : build-linux-amd64
2+
3+ on :
4+ push :
5+ branches :
6+ - " 2e"
7+ paths :
8+ - " .github/workflows/build-linux-amd64.yaml"
9+ workflow_dispatch :
10+
11+ jobs :
12+ define-matrices :
13+ runs-on : ubuntu-latest
14+ outputs :
15+ images : ${{ steps.images.outputs.images }}
16+ chapters : ${{ steps.chapters.outputs.chapters }}
17+ steps :
18+ - uses : actions/checkout@master
19+ - name : Generate image matrix
20+ id : images
21+ working-directory : build/image-lists
22+ shell : pwsh
23+ run : |
24+ $list = $(cat images-linux.json)
25+ $out = "images=$list"
26+ echo $out
27+ $out >> $env:GITHUB_OUTPUT
28+ - name : Generate chapter matrix
29+ id : chapters
30+ working-directory : build/image-lists
31+ shell : pwsh
32+ run : |
33+ $list = $(cat chapters-linux.json)
34+ $out = "chapters=$list"
35+ echo $out
36+ $out >> $env:GITHUB_OUTPUT
37+
38+ build-images-linux-amd64 :
39+ runs-on : ubuntu-latest
40+ needs : define-matrices
41+ strategy :
42+ matrix :
43+ image : ${{ fromJSON(needs.define-matrices.outputs.images) }}
44+ steps :
45+ - name : Registry login
46+ uses : docker/login-action@v3
47+ with :
48+ username : ${{ secrets.DOCKER_HUB_USERNAME }}
49+ password : ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
50+ - uses : actions/checkout@master
51+ - uses : ./.github/actions/build
52+ with :
53+ filter : ${{ matrix.image }}
54+
55+ build-chapters-linux-amd64 :
56+ runs-on : ubuntu-latest
57+ needs : define-matrices
58+ strategy :
59+ matrix :
60+ chapter : ${{ fromJSON(needs.define-matrices.outputs.chapters) }}
61+ steps :
62+ - name : Registry login
63+ uses : docker/login-action@v3
64+ with :
65+ username : ${{ secrets.DOCKER_HUB_USERNAME }}
66+ password : ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
67+ - uses : actions/checkout@master
68+ - uses : ./.github/actions/build
69+ with :
70+ images : ' false'
71+ chapters : ' true'
72+ filter : ${{ matrix.chapter }}
0 commit comments