Skip to content

Commit b5d068b

Browse files
authored
fix: operator image build (#2086)
* fix: operator image build Signed-off-by: Anatolii Bazko <abazko@redhat.com>
1 parent 253500b commit b5d068b

File tree

5 files changed

+32
-57
lines changed

5 files changed

+32
-57
lines changed

.github/workflows/devfile-ci.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,20 +28,20 @@ jobs:
2828
uses: actions/checkout@v4
2929
-
3030
name: Set up QEMU
31-
uses: docker/setup-qemu-action@v2
31+
uses: docker/setup-qemu-action@v3
3232
-
3333
name: Set up Docker Buildx
3434
uses: docker/setup-buildx-action@v2
3535
-
3636
name: Login to quay.io
37-
uses: docker/login-action@v2
37+
uses: docker/login-action@v3
3838
with:
3939
registry: quay.io
4040
username: ${{ secrets.QUAY_USERNAME }}
4141
password: ${{ secrets.QUAY_PASSWORD }}
4242
-
4343
name: Build and push container
44-
uses: docker/build-push-action@v4
44+
uses: docker/build-push-action@v6
4545
with:
4646
context: .
4747
file: .devfile.Dockerfile

.github/workflows/minikube-test-helm.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
id: run-minikube
2323
uses: che-incubator/setup-minikube-action@next
2424
with:
25-
minikube-version: v1.29.0
25+
minikube-version: v1.37.0
2626
- name: Install yq
2727
run: sudo pip install yq
2828
- name: Install chectl

.github/workflows/minikube-test-upgrade-stable-to-next.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
id: run-minikube
2626
uses: che-incubator/setup-minikube-action@next
2727
with:
28-
minikube-version: v1.29.0
28+
minikube-version: v1.37.0
2929
- name: Install yq
3030
run: sudo pip install yq
3131
- name: Install chectl

.github/workflows/minikube-test-upgrade-stable-to-stable.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
id: run-minikube
2626
uses: che-incubator/setup-minikube-action@next
2727
with:
28-
minikube-version: v1.29.0
28+
minikube-version: v1.37.0
2929
- name: Install yq
3030
run: sudo pip install yq
3131
- name: Install chectl

.github/workflows/release-next-catalog-and-operator-image.yaml

Lines changed: 26 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -23,68 +23,43 @@ on:
2323
- main
2424
jobs:
2525
build-operator-image-multiarch:
26-
strategy:
27-
fail-fast: false
28-
matrix:
29-
runners: ['ubuntu-24.04', 'ubuntu-24.04-arm']
30-
runs-on: ${{matrix.runners}}
26+
runs-on: ubuntu-24.04
27+
28+
outputs:
29+
git-sha: ${{ steps.git-sha.outputs.sha }}
30+
3131
steps:
3232
- name: Checkout source code
3333
uses: actions/checkout@v4
34-
- name: Set arch environment variable
35-
run: |
36-
if [[ ${{matrix.runners}} == 'ubuntu-24.04' ]]; then
37-
echo arch="amd64" >> $GITHUB_ENV
38-
else
39-
echo arch="arm64" >> $GITHUB_ENV
40-
fi
41-
- name: Set short_sha environment variable
42-
run: echo short_sha="$(git rev-parse --short=7 HEAD)" >> $GITHUB_ENV
34+
- name: Set up QEMU
35+
uses: docker/setup-qemu-action@v3
36+
- name: Set up Docker Buildx
37+
uses: docker/setup-buildx-action@v3
38+
- name: Set output for Git short SHA
39+
id: git-sha
40+
run: echo "sha=$(git rev-parse --short=7 HEAD)" >> $GITHUB_OUTPUT
41+
4342
- name: Login to quay.io
44-
uses: docker/login-action@v2
43+
uses: docker/login-action@v3
4544
with:
4645
username: ${{ secrets.QUAY_USERNAME }}
4746
password: ${{ secrets.QUAY_PASSWORD }}
4847
registry: quay.io
49-
- name: Build operator image
50-
run: |
51-
docker buildx build \
52-
--platform linux/${{env.arch}} \
53-
--progress=plain \
54-
--push \
55-
-t quay.io/eclipse/che-operator:${{env.arch}}-${{env.short_sha}} .
5648

57-
publish-operator-manifest:
58-
name: publish operator image
59-
runs-on: ubuntu-24.04
60-
needs: build-operator-image-multiarch
61-
steps:
62-
- name: Checkout source code
63-
uses: actions/checkout@v4
64-
- name: Login to Quay.io
65-
uses: docker/login-action@v2
49+
- name: Build and push
50+
uses: docker/build-push-action@v6
6651
with:
67-
registry: quay.io
68-
username: ${{ secrets.QUAY_USERNAME }}
69-
password: ${{ secrets.QUAY_PASSWORD }}
70-
- name: Set short_sha environment variable
71-
run: echo short_sha="$(git rev-parse --short=7 HEAD)" >> $GITHUB_ENV
72-
- name: publish
73-
run: |
74-
docker manifest create quay.io/eclipse/che-operator:next \
75-
--amend quay.io/eclipse/che-operator:amd64-${{env.short_sha}} \
76-
--amend quay.io/eclipse/che-operator:arm64-${{env.short_sha}}
77-
docker manifest annotate quay.io/eclipse/che-operator:next \
78-
quay.io/eclipse/che-operator:amd64-${{env.short_sha}} \
79-
--os linux --arch amd64
80-
docker manifest annotate quay.io/eclipse/che-operator:next \
81-
quay.io/eclipse/che-operator:arm64-${{env.short_sha}} \
82-
--os linux --arch arm64
83-
docker manifest push quay.io/eclipse/che-operator:next
52+
context: .
53+
push: true
54+
platforms: linux/amd64, linux/arm64, linux/ppc64le, linux/s390x
55+
tags: |
56+
quay.io/eclipse/che-operator:next
57+
quay.io/eclipse/che-operator:sha-${{ steps.git-sha.outputs.sha }}
58+
file: ./Dockerfile
8459

8560
build-catalog:
8661
runs-on: ubuntu-24.04
87-
needs: publish-operator-manifest
62+
needs: build-operator-image-multiarch
8863
steps:
8964
- name: Checkout source code
9065
uses: actions/checkout@v4
@@ -95,7 +70,7 @@ jobs:
9570
- name: Install yq
9671
run: sudo pip install yq
9772
- name: Login to quay.io
98-
uses: docker/login-action@v2
73+
uses: docker/login-action@v3
9974
with:
10075
username: ${{ secrets.QUAY_USERNAME }}
10176
password: ${{ secrets.QUAY_PASSWORD }}
@@ -121,7 +96,7 @@ jobs:
12196
- name: Install yq
12297
run: sudo pip install yq
12398
- name: Login to quay.io
124-
uses: docker/login-action@v2
99+
uses: docker/login-action@v3
125100
with:
126101
username: ${{ secrets.QUAY_USERNAME }}
127102
password: ${{ secrets.QUAY_PASSWORD }}

0 commit comments

Comments
 (0)