|
1 | 1 | name: Build |
2 | 2 | on: |
| 3 | + workflow_dispatch: |
3 | 4 | schedule: |
4 | 5 | - cron: '30 11 * * *' |
5 | 6 | push: |
|
9 | 10 | - 'v*.*.*' |
10 | 11 |
|
11 | 12 | jobs: |
12 | | - build: |
13 | | - # Downgrade due to segfault issus with qemu |
14 | | - runs-on: ubuntu-22.04 |
| 13 | + prepare: |
| 14 | + runs-on: ubuntu-24.04 |
| 15 | + outputs: |
| 16 | + version: ${{ steps.latest_version.outputs.version }} |
| 17 | + tag: ${{ steps.latest_version.outputs.tag }} |
| 18 | + tags: ${{ steps.meta.outputs.tags }} |
| 19 | + labels: ${{ steps.meta.outputs.labels }} |
15 | 20 | steps: |
16 | 21 | - uses: actions/checkout@v5 |
17 | 22 | with: |
@@ -51,14 +56,14 @@ jobs: |
51 | 56 | type=semver,pattern={{major}}.{{minor}},value=${{ steps.latest_version.outputs.version }} |
52 | 57 | type=semver,pattern={{version}},value=${{ steps.latest_version.outputs.version }} |
53 | 58 |
|
54 | | - - name: Set up QEMU |
55 | | - id: qemu |
56 | | - uses: docker/setup-qemu-action@v3 |
| 59 | + build-intel: |
| 60 | + needs: [prepare] |
| 61 | + runs-on: ubuntu-24.04 |
| 62 | + steps: |
| 63 | + - uses: actions/checkout@v4 |
57 | 64 | with: |
58 | | - # setup-qemu-action by default uses tonistiigi/binfmt:latest, |
59 | | - # which was out of date, see https://github.com/tonistiigi/binfmt/issues/165. |
60 | | - # Now it has been updated, but still causes segfaults. |
61 | | - image: tonistiigi/binfmt:qemu-v7.0.0 |
| 65 | + ref: ${{ needs.prepare.outputs.tag }} |
| 66 | + fetch-depth: 100 |
62 | 67 |
|
63 | 68 | - name: Set up Docker Buildx |
64 | 69 | id: buildx |
@@ -88,23 +93,56 @@ jobs: |
88 | 93 | uses: docker/build-push-action@v6 |
89 | 94 | with: |
90 | 95 | context: . |
91 | | - platforms: linux/amd64,linux/arm64 |
| 96 | + platforms: linux/amd64 |
92 | 97 | push: true |
93 | | - tags: ${{ steps.meta.outputs.tags }} |
94 | | - labels: ${{ steps.meta.outputs.labels }} |
| 98 | + tags: ${{ needs.prepare.outputs.tags }} |
| 99 | + labels: ${{ needs.prepare.outputs.labels }} |
95 | 100 |
|
96 | | - - name: Send mail for Opsgenie heartbeat |
97 | | - uses: dawidd6/action-send-mail@v6 |
| 101 | + build-arm: |
| 102 | + needs: [prepare] |
| 103 | + runs-on: ubuntu-24.02-arm |
| 104 | + steps: |
| 105 | + - uses: actions/checkout@v4 |
98 | 106 | with: |
99 | | - connection_url: ${{secrets.OPSGENIE_HEARTBEAT_MAIL_CREDENTIALS}} |
100 | | - subject: Github Actions heartbeat ping |
101 | | - |
102 | | - from: Github Actions <[email protected]> |
103 | | - body: Build job of ${{github.repository}} completed successfully! |
| 107 | + ref: ${{ needs.prepare.outputs.tag }} |
| 108 | + fetch-depth: 100 |
| 109 | + |
| 110 | + - name: Set up Docker Buildx |
| 111 | + id: buildx |
| 112 | + uses: docker/setup-buildx-action@v3 |
| 113 | + |
| 114 | + - name: Login to Docker Hub |
| 115 | + uses: docker/login-action@v3 |
| 116 | + with: |
| 117 | + username: ${{ secrets.DOCKER_IO_REGISTRY_USER }} |
| 118 | + password: ${{ secrets.DOCKER_IO_REGISTRY_PASSWORD }} |
| 119 | + |
| 120 | + - name: Login to Google Artifacts Registry |
| 121 | + uses: docker/login-action@v3 |
| 122 | + with: |
| 123 | + registry: europe-docker.pkg.dev/flownative/docker |
| 124 | + username: '_json_key' |
| 125 | + password: ${{ secrets.GOOGLE_ARTIFACTS_PASSWORD_DOCKER }} |
| 126 | + |
| 127 | + - name: Login to Harbor |
| 128 | + uses: docker/login-action@v3 |
| 129 | + with: |
| 130 | + registry: harbor.flownative.io |
| 131 | + username: ${{ secrets.HARBOR_BEACH_USERNAME }} |
| 132 | + password: ${{ secrets.HARBOR_BEACH_PASSWORD }} |
| 133 | + |
| 134 | + - name: Build Docker image |
| 135 | + uses: docker/build-push-action@v6 |
| 136 | + with: |
| 137 | + context: . |
| 138 | + platforms: linux/arm64 |
| 139 | + push: true |
| 140 | + tags: ${{ needs.prepare.outputs.tags }} |
| 141 | + labels: ${{ needs.prepare.outputs.labels }} |
104 | 142 |
|
105 | 143 | release-helm: |
106 | | - runs-on: ubuntu-latest |
107 | | - needs: build |
| 144 | + runs-on: ubuntu-24.04 |
| 145 | + needs: [build-intel, build-arm] |
108 | 146 | permissions: |
109 | 147 | contents: write |
110 | 148 | packages: write |
@@ -134,3 +172,12 @@ jobs: |
134 | 172 | repository_path: 'beach-charts' |
135 | 173 | repository_user: ${{ secrets.HARBOR_BEACH_CHARTS_USERNAME }} |
136 | 174 | repository_password: ${{ secrets.HARBOR_BEACH_CHARTS_PASSWORD }} |
| 175 | + |
| 176 | + - name: Send mail for Opsgenie heartbeat |
| 177 | + uses: dawidd6/action-send-mail@v4 |
| 178 | + with: |
| 179 | + connection_url: ${{secrets.OPSGENIE_HEARTBEAT_MAIL_CREDENTIALS}} |
| 180 | + subject: Github Actions heartbeat ping |
| 181 | + |
| 182 | + from: Github Actions <[email protected]> |
| 183 | + body: Build job of ${{github.repository}} completed successfully! |
0 commit comments