File tree Expand file tree Collapse file tree 3 files changed +71
-74
lines changed
Expand file tree Collapse file tree 3 files changed +71
-74
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ name : Build Docker images
3+ on :
4+ workflow_call :
5+ inputs :
6+ push :
7+ required : false
8+ type : boolean
9+ secrets :
10+ DOCKERHUB_TOKEN :
11+ required : false
12+
13+ permissions :
14+ contents : read
15+
16+ jobs :
17+ prepare :
18+ name : Build (and push) Docker image
19+ runs-on : blacksmith-2vcpu-ubuntu-2404
20+ steps :
21+ - name : Login to DockerHub
22+ uses : docker/login-action@v3
23+ with :
24+ username : tobix
25+ password : ${{ secrets.DOCKERHUB_TOKEN }}
26+ if : ${{ inputs.push }}
27+
28+ - name : Detect image metadata
29+ id : meta
30+ uses : docker/metadata-action@v5
31+ with :
32+ images : tobix/wine
33+
34+ - name : Set up Docker Buildx
35+ uses : docker/setup-buildx-action@v3
36+
37+ - name : Build stable
38+ uses : docker/build-push-action@v6
39+ with :
40+ push : ${{ inputs.push }}
41+ tags : tobix/wine:stable
42+ labels : ${{ steps.meta.outputs.labels }}
43+ build-args : |
44+ WINE_FLAVOUR=stable
45+ cache-to : type=local,dest=/tmp/buildx-cache,mode=max
46+
47+ - name : Build devel
48+ uses : docker/build-push-action@v6
49+ with :
50+ push : ${{ inputs.push }}
51+ tags : tobix/wine:devel
52+ labels : ${{ steps.meta.outputs.labels }}
53+ build-args : |
54+ WINE_FLAVOUR=devel
55+ cache-from : type=local,src=/tmp/buildx-cache
56+
57+ - name : Build staging
58+ uses : docker/build-push-action@v6
59+ with :
60+ push : ${{ inputs.push }}
61+ tags : tobix/wine:staging
62+ labels : ${{ steps.meta.outputs.labels }}
63+ build-args : |
64+ WINE_FLAVOUR=staging
65+ cache-from : type=local,src=/tmp/buildx-cache
Original file line number Diff line number Diff line change @@ -13,50 +13,7 @@ permissions:
1313
1414jobs :
1515 build :
16- name : Build and push Docker image
17- runs-on : blacksmith-2vcpu-ubuntu-2404
18- steps :
19- - name : Login to DockerHub
20- uses : docker/login-action@v3
21- with :
22- username : tobix
23- password : ${{ secrets.DOCKERHUB_TOKEN }}
24-
25- - name : Detect image metadata
26- id : meta
27- uses : docker/metadata-action@v5
28- with :
29- images : tobix/wine
30-
31- - name : Set up Docker Buildx
32- uses : docker/setup-buildx-action@v3
33-
34- - name : Build stable
35- uses : docker/build-push-action@v6
36- with :
37- push : true
38- tags : tobix/wine:stable
39- labels : ${{ steps.meta.outputs.labels }}
40- build-args : |
41- WINE_FLAVOUR=stable
42- cache-to : type=local,dest=/tmp/buildx-cache,mode=max
43-
44- - name : Build devel
45- uses : docker/build-push-action@v6
46- with :
47- push : true
48- tags : tobix/wine:devel
49- labels : ${{ steps.meta.outputs.labels }}
50- build-args : |
51- WINE_FLAVOUR=devel
52- cache-from : type=local,src=/tmp/buildx-cache
53-
54- - name : Build staging
55- uses : docker/build-push-action@v6
56- with :
57- push : true
58- tags : tobix/wine:staging
59- labels : ${{ steps.meta.outputs.labels }}
60- build-args : |
61- WINE_FLAVOUR=staging
62- cache-from : type=local,src=/tmp/buildx-cache
16+ uses : ./.github/workflows/build.yaml
17+ with :
18+ push : true
19+ secrets : inherit
Original file line number Diff line number Diff line change 11---
2- name : Test Docker image
2+ name : Test Docker image build
33on :
44 - pull_request
55
@@ -8,29 +8,4 @@ permissions:
88
99jobs :
1010 build :
11- name : Build Docker image
12- runs-on : blacksmith-2vcpu-ubuntu-2404
13- steps :
14- - name : Set up Docker Buildx
15- uses : docker/setup-buildx-action@v3
16-
17- - name : Build stable
18- uses : docker/build-push-action@v6
19- with :
20- build-args : |
21- WINE_FLAVOUR=stable
22- cache-to : type=local,dest=/tmp/buildx-cache,mode=max
23-
24- - name : Build devel
25- uses : docker/build-push-action@v6
26- with :
27- build-args : |
28- WINE_FLAVOUR=devel
29- cache-from : type=local,src=/tmp/buildx-cache
30-
31- - name : Build staging
32- uses : docker/build-push-action@v6
33- with :
34- build-args : |
35- WINE_FLAVOUR=staging
36- cache-from : type=local,src=/tmp/buildx-cache
11+ uses : ./.github/workflows/build.yaml
You can’t perform that action at this time.
0 commit comments