@@ -35,25 +35,10 @@ jobs:
35
35
- name : Test docker buildx
36
36
run : docker buildx ls
37
37
38
- - name : Get Latest Idris Commit SHA
39
- id : get-sha
40
- uses : ./.github/actions/get-idris-sha
41
-
42
- # mainly just for caching purposes - makes it faster to build later on
43
- # build in arm (or my oracle server) as well so we can make the most use of our time in the build step
44
- - name : Build Base
45
-
38
+ - name : Build Base Image
39
+ uses : ./.github/actions/build-base-img
46
40
with :
47
- context : .
48
- platforms : linux/amd64,linux/arm64
49
- file : base.Dockerfile
50
- build-args : |
51
- IDRIS_VERSION=${{ inputs.idris-version }}
52
- IDRIS_SHA=${{ steps.get-sha.outputs.sha }}
53
- # When doing matrix builds, we need to scope the image
54
- # https://github.com/moby/buildkit/issues/2885
55
- cache-from : type=gha,scope=build-base-${{ inputs.idris-version }}
56
- cache-to : type=gha,mode=max,scope=build-base-${{ inputs.idris-version }}
41
+ idris-version : ${{ inputs.idris-version }}
57
42
58
43
base-test-1 :
59
44
name : Test 1 Base
@@ -67,22 +52,13 @@ jobs:
67
52
68
53
- name : Set up Docker Buildx
69
54
uses : docker/setup-buildx-action@v2
70
-
71
- - name : Get Latest Idris Commit SHA
72
- id : get-sha
73
- uses : ./.github/actions/get-idris-sha
74
-
75
- - name : Build Base
76
-
55
+
56
+ - name : Build Base Image
57
+ uses : ./.github/actions/build-base-img
77
58
with :
78
- context : .
79
- file : base.Dockerfile
80
- build-args : |
81
- IDRIS_VERSION=${{ inputs.idris-version }}
82
- IDRIS_SHA=${{ steps.get-sha.outputs.sha }}
59
+ idris-version : ${{ inputs.idris-version }}
60
+ load : true
83
61
tags : ${{ env.TAG }}
84
- load : true
85
- cache-from : type=gha,scope=build-base-${{ inputs.idris-version }}
86
62
87
63
- name : Setup Bats and Bats libs
88
64
uses :
brokenpip3/[email protected]
@@ -115,23 +91,14 @@ jobs:
115
91
116
92
- name : Set up Docker Buildx
117
93
uses : docker/setup-buildx-action@v2
118
-
119
- - name : Get Latest Idris Commit SHA
120
- id : get-sha
121
- uses : ./.github/actions/get-idris-sha
122
-
123
- - name : Build Base
124
-
94
+
95
+ - name : Build Base Image
96
+ uses : ./.github/actions/build-base-img
125
97
with :
126
- context : .
127
- file : base.Dockerfile
128
- build-args : |
129
- IDRIS_VERSION=${{ inputs.idris-version }}
130
- IDRIS_SHA=${{ steps.get-sha.outputs.sha }}
98
+ idris-version : ${{ inputs.idris-version }}
99
+ load : true
131
100
tags : ${{ env.TAG }}
132
- load : true
133
- cache-from : type=gha,scope=build-base-${{ inputs.idris-version }}
134
-
101
+
135
102
- name : Run Test
136
103
run : |
137
104
docker run ${{ env.TAG }} /bin/bash -c "make test"
@@ -165,23 +132,13 @@ jobs:
165
132
with :
166
133
# since we're using a local registry
167
134
driver-opts : network=host
168
-
169
- - name : Get Latest Idris Commit SHA
170
- id : get-sha
171
- uses : ./.github/actions/get-idris-sha
172
-
173
- - name : Build Base
174
-
135
+
136
+ - name : Build Base Image
137
+ uses : ./.github/actions/build-base-img
175
138
with :
176
- context : .
177
- file : base.Dockerfile
178
- build-args : |
179
- IDRIS_VERSION=${{ inputs.idris-version }}
180
- IDRIS_SHA=${{ steps.get-sha.outputs.sha }}
181
- tags : ${{ env.BASE_TAG }}
182
- # push to local registry
139
+ idris-version : ${{ inputs.idris-version }}
183
140
push : true
184
- cache-from : type=gha,scope=build-base- ${{ inputs.idris-version }}
141
+ tags : ${{ env.BASE_TAG }}
185
142
186
143
- name : Run `docker image ls`
187
144
run : docker image ls
0 commit comments