Browse Source

Fix CI docker buildx args

Kellin McAvoy 5 years ago
parent
commit
2083192b55
2 changed files with 6 additions and 2 deletions
  1. 5 1
      .github/workflows/ci.yml
  2. 1 1
      Makefile

+ 5 - 1
.github/workflows/ci.yml

@@ -220,6 +220,10 @@ jobs:
           restore-keys: ${{ runner.os }}-pkg-
 
       - name: Build Artifacts
+        env:
+          # We're using docker buildx, which doesn't actually load the images it
+          # builds by default. Specifying --load does so.
+          BUILD_ARGS: "--load"
         run: make docker.build
 
       - name: Login to Docker
@@ -231,8 +235,8 @@ jobs:
           password: ${{ secrets.GHCR_TOKEN }}
 
       - name: Publish Artifacts
-        run: make docker.push
         if: env.GHCR_USERNAME != ''
+        run: make docker.push
 
       - name: Promote Artifacts to main release channel
         if: github.ref == 'refs/heads/main' && env.GHCR_USERNAME != ''

+ 1 - 1
Makefile

@@ -199,7 +199,7 @@ build.all: docker.build helm.build
 
 docker.build: build ## Build the docker image
 	@$(INFO) docker build
-	@docker build . -t $(IMAGE_REGISTRY):$(VERSION)
+	@docker build . $(BUILD_ARGS) -t $(IMAGE_REGISTRY):$(VERSION)
 	@$(OK) docker build
 
 docker.push: