Skip to content

Commit

Permalink
use BuildKit in actions test for charmed-katib
Browse files Browse the repository at this point in the history
  • Loading branch information
tenzen-y committed Aug 20, 2022
1 parent 5a541f6 commit 2b6f9c1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/template-publish-image/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ runs:
type=sha,prefix=v1beta1-
- name: Build and Push
uses: docker/build-push-action@v2
uses: docker/build-push-action@v3
with:
context: .
file: ${{ inputs.dockerfile }}
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/test-charmed-katib.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,19 @@ jobs:
sudo snap install juju-wait --classic
sudo pip3 install charmcraft==1.3.1
- name: Set Up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Build Docker images
run: |
set -eux
images=("katib-controller" "katib-ui" "katib-db-manager")
folders=("katib-controller" "ui" "db-manager")
for idx in {0..2}; do
docker build . \
docker buildx build . \
-t docker.io/kubeflowkatib/${images[$idx]}:latest \
-f cmd/${folders[$idx]}/v1beta1/Dockerfile
-f cmd/${folders[$idx]}/v1beta1/Dockerfile \
--load
docker save docker.io/kubeflowkatib/${images[$idx]} > ${images[$idx]}.tar
microk8s ctr image import ${images[$idx]}.tar
done
Expand Down

0 comments on commit 2b6f9c1

Please sign in to comment.