@@ -42,7 +42,7 @@ concurrency:
4242env :
4343 RUN_TESTS : false
4444 BUILD_ONLY : false
45- REGISTRY_IMAGE : giskardai/giskard
45+ REGISTRY_IMAGE : ' giskardai/giskard'
4646 DOCKERHUB_USER : giskardai
4747# https://docs.docker.com/build/ci/github-actions/multi-platform/#distribute-build-across-multiple-runners
4848jobs :
6464 run : echo 'BUILD_ONLY=true' >> $GITHUB_ENV
6565
6666 - name : Check disk space
67- if : ${{ env.RUN_TESTS }}
67+ if : ${{ env.RUN_TESTS == 'true' }}
6868 run : |
6969 df -h
7070 - name : List installed packages
7373 apt list --installed | wc -l
7474
7575 - name : Free disk space
76- if : ${{ env.RUN_TESTS }}
76+ if : ${{ env.RUN_TESTS == 'true' }}
7777 run : |
7878 sudo swapoff -a
7979 sudo rm -f /swapfile
@@ -89,11 +89,11 @@ jobs:
8989 sudo apt autoclean -y
9090
9191 - name : Check new disk space
92- if : ${{ env.RUN_TESTS }}
92+ if : ${{ env.RUN_TESTS == 'true' }}
9393 run : |
9494 df -h
9595 - name : List remaning installed packages
96- if : ${{ env.RUN_TESTS }}
96+ if : ${{ env.RUN_TESTS == 'true' }}
9797 run : |
9898 dpkg-query --show --showformat='${Installed-Size}\t${Package}\n' | sort -rh | head -25 | awk '{print $1/1024, $2}'
9999 apt list --installed | wc -l
@@ -123,8 +123,8 @@ jobs:
123123 ${{ env.REGISTRY_IMAGE }}
124124 tags : |
125125 type=edge,branch=main
126- type=schedule
127126 type=ref,event=branch
127+ type=schedule
128128 type=ref,event=tag
129129 type=ref,event=pr
130130
@@ -136,38 +136,32 @@ jobs:
136136 password : ${{ secrets.DOCKERHUB_TOKEN }}
137137
138138 - name : Install deps inside docker
139- if : ${{ env.RUN_TESTS }}
139+ if : ${{ env.RUN_TESTS == 'true' }}
140140 uses : docker/build-push-action@v5
141141 with :
142142 context : .
143143 target : full-install-python
144- push : false
145144 load : true
146145 tags : ${{ steps.meta.outputs.tags }}
147146 labels : ${{ steps.meta.outputs.labels }}
148147 builder : ${{ steps.builder.outputs.name }}
149148 platforms : |
150149 ${{ matrix.platform}}
151- cache-from : type=gha
152- cache-to : type=gha,mode=max
153150
154151 - name : Run python test inside docker
155- if : ${{ env.RUN_TESTS }}
152+ if : ${{ env.RUN_TESTS == 'true' }}
156153 uses : docker/build-push-action@v5
157154 with :
158155 context : .
159156 target : test-python
160- push : false
161- load : false
162157 tags : ${{ steps.meta.outputs.tags }}
163158 labels : ${{ steps.meta.outputs.labels }}
164159 builder : ${{ steps.builder.outputs.name }}
165160 platforms : |
166161 ${{ matrix.platform}}
167- cache-from : type=gha
168162
169163 # - name: Run python integration test inside docker
170- # if: ${{ env.RUN_TESTS }}
164+ # if: ${{ env.RUN_TESTS == 'true' }}
171165 # uses: docker/build-push-action@v5
172166 # with:
173167 # context: .
@@ -187,14 +181,10 @@ jobs:
187181 with :
188182 context : .
189183 target : prod
190- push : ${{ env.BUILD_ONLY != 'true' }}
191- tags : ${{ steps.meta.outputs.tags }}
192184 labels : ${{ steps.meta.outputs.labels }}
193185 builder : ${{ steps.builder.outputs.name }}
194186 platforms : |
195187 ${{ matrix.platform}}
196- cache-from : type=gha
197- cache-to : type=gha,mode=max
198188 outputs : type=image,name=${{ env.REGISTRY_IMAGE }},push-by-digest=true,name-canonical=true,push=${{ env.BUILD_ONLY != 'true' }}
199189
200190 # For details, see link below
@@ -230,7 +220,14 @@ jobs:
230220 id : meta
231221 uses : docker/metadata-action@v5
232222 with :
233- images : ${{ env.REGISTRY_IMAGE }}
223+ images : |
224+ ${{ env.REGISTRY_IMAGE }}
225+ tags : |
226+ type=edge,branch=main
227+ type=ref,event=branch
228+ type=schedule
229+ type=ref,event=tag
230+ type=ref,event=pr
234231 - name : Login to Docker Hub
235232 uses : docker/login-action@v3
236233 with :
0 commit comments