Skip to content

Commit 4521daf

Browse files
authored
Merge pull request #87 from cooktheryan/multiarch
attempt to build multiarch images
2 parents ed6bc5e + cf47f3d commit 4521daf

File tree

2 files changed

+52
-33
lines changed

2 files changed

+52
-33
lines changed

.github/workflows/release.yaml

Lines changed: 26 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -172,16 +172,16 @@ jobs:
172172
runs-on: ubuntu-20.04
173173

174174
steps:
175-
- name: Load container artifact
176-
uses: actions/download-artifact@v1
177-
with:
178-
name: operator-bundle
179-
path: /tmp
175+
- name: Check out code
176+
uses: actions/checkout@v2
180177

181-
- name: Import container image
182-
run: |
183-
docker load -i /tmp/bundle.tar
184-
docker inspect "${BUNDLE_IMAGE}:${{ env.TAG }}"
178+
- name: Set up QEMU
179+
uses: docker/setup-qemu-action@v1
180+
181+
- name: Set up Docker Buildx
182+
uses: docker/setup-buildx-action@v1
183+
with:
184+
buildkitd-flags: --debug
185185

186186
- name: Login to registry
187187
# If the registry server is specified in the image name, we use that.
@@ -190,11 +190,20 @@ jobs:
190190
[[ "${BUNDLE_IMAGE}" =~ ^([^/]+)/[^/]+/[^/]+ ]] && REGISTRY="${BASH_REMATCH[1]}" || REGISTRY="docker.io"
191191
echo "Attempting docker login to: ${REGISTRY}"
192192
echo "${{ secrets.REGISTRY_PASSWORD }}" | docker login -u "${{ secrets.REGISTRY_USERNAME }}" --password-stdin ${REGISTRY}
193-
194-
- name: Push to registry (version tag)
195-
if: >
196-
(github.event_name == 'push' || github.event_name == 'schedule') &&
197-
github.ref == 'refs/heads/main'
198-
run: |
199-
echo "Pushing to ${{ env.TAG }}"
200-
docker push "${BUNDLE_IMAGE}:${{ env.TAG }}"
193+
- name: "Build Operator Image"
194+
uses: docker/build-push-action@v2
195+
with:
196+
context: .
197+
file: "./Dockerfile"
198+
platforms: "linux/amd64,linux/arm64"
199+
push: true
200+
tags: ${{ env.OPERATOR_IMAGE }}
201+
202+
- name: "Build Bundle Image"
203+
uses: docker/build-push-action@v2
204+
with:
205+
context: .
206+
file: "./bundle.Dockerfile"
207+
platforms: "linux/amd64,linux/arm64"
208+
push: true
209+
tags: ${{ env.BUNDLE_IMAGE }}

.github/workflows/validate-ipfs.yaml

Lines changed: 26 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -169,16 +169,16 @@ jobs:
169169
runs-on: ubuntu-20.04
170170

171171
steps:
172-
- name: Load container artifact
173-
uses: actions/download-artifact@v1
174-
with:
175-
name: operator-bundle
176-
path: /tmp
172+
- name: Check out code
173+
uses: actions/checkout@v2
177174

178-
- name: Import container image
179-
run: |
180-
docker load -i /tmp/bundle.tar
181-
docker inspect "${BUNDLE_IMAGE}:${{ env.TAG }}"
175+
- name: Set up QEMU
176+
uses: docker/setup-qemu-action@v1
177+
178+
- name: Set up Docker Buildx
179+
uses: docker/setup-buildx-action@v1
180+
with:
181+
buildkitd-flags: --debug
182182

183183
- name: Login to registry
184184
# If the registry server is specified in the image name, we use that.
@@ -188,10 +188,20 @@ jobs:
188188
echo "Attempting docker login to: ${REGISTRY}"
189189
echo "${{ secrets.REGISTRY_PASSWORD }}" | docker login -u "${{ secrets.REGISTRY_USERNAME }}" --password-stdin ${REGISTRY}
190190
191-
- name: Push to registry (version tag)
192-
if: >
193-
(github.event_name == 'push' || github.event_name == 'schedule') &&
194-
github.ref == 'refs/heads/main'
195-
run: |
196-
echo "Pushing to ${{ env.TAG }}"
197-
docker push "${BUNDLE_IMAGE}:${{ env.TAG }}"
191+
- name: "Build Operator Image"
192+
uses: docker/build-push-action@v2
193+
with:
194+
context: .
195+
file: "./Dockerfile"
196+
platforms: "linux/amd64,linux/arm64"
197+
push: true
198+
tags: ${{ env.OPERATOR_IMAGE }}
199+
200+
- name: "Build Bundle Image"
201+
uses: docker/build-push-action@v2
202+
with:
203+
context: .
204+
file: "./bundle.Dockerfile"
205+
platforms: "linux/amd64,linux/arm64"
206+
push: true
207+
tags: ${{ env.BUNDLE_IMAGE }}

0 commit comments

Comments
 (0)