Skip to content

Commit

Permalink
feat: install docker buildx plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
squakez committed Jan 18, 2024
1 parent 7075d14 commit 0fc957b
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 6 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,13 @@ on:
branches:
- main
schedule:
- cron: "0 7 * * *"
- cron: "0 5 * * *"
workflow_dispatch:
inputs:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true

jobs:

Expand Down
4 changes: 3 additions & 1 deletion kind.sh
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,9 @@ install_kubectl() {
install_docker() {
if [ "$RUNNER_OS" == "macOS" ] && ! [ -x "$(command -v docker)" ]; then
echo 'Installing docker...'
brew install docker colima
brew install docker docker-buildx colima
mkdir -p ~/.docker/cli-plugins
ln -sfn /usr/local/opt/docker-buildx/bin/docker-buildx ~/.docker/cli-plugins/docker-buildx
colima start
fi
}
Expand Down
10 changes: 6 additions & 4 deletions registry.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ main() {
local document=false

parse_command_line "$@"

if [[ "$document" = "false" ]]
then
install_docker
Expand Down Expand Up @@ -176,8 +176,10 @@ parse_command_line() {
install_docker() {
if [ "$RUNNER_OS" == "macOS" ] && ! [ -x "$(command -v docker)" ]; then
echo 'Installing docker...'
brew install docker colima
colima start --cpu "$cpu" --memory "$memory" --disk "$disk"
brew install docker docker-buildx colima
mkdir -p ~/.docker/cli-plugins
ln -sfn /usr/local/opt/docker-buildx/bin/docker-buildx ~/.docker/cli-plugins/docker-buildx
colima start
fi
}

Expand All @@ -201,7 +203,7 @@ connect_registry() {

create_kind_config() {
sudo mkdir -p /etc/kind-registry
cat <<EOF | sudo dd status=none of=/etc/kind-registry/config.yaml
cat <<EOF | sudo dd of=/etc/kind-registry/config.yaml
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
containerdConfigPatches:
Expand Down

0 comments on commit 0fc957b

Please sign in to comment.