Skip to content

Commit cf47f3d

Browse files
committed
multiarch release builds
Signed-off-by: Oleg S <97077423+RobotSail@users.noreply.github.com>
1 parent 64e1be9 commit cf47f3d

File tree

1 file changed

+26
-17
lines changed

1 file changed

+26
-17
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 }}

0 commit comments

Comments
 (0)