|
7 | 7 | - master |
8 | 8 | - release |
9 | 9 | - ipam |
| 10 | + - frc/buildpipeline |
10 | 11 | repository_dispatch: |
11 | 12 | types: |
12 | 13 | - test-command |
|
46 | 47 | echo "commit-ref=${{ github.sha }}" >> $GITHUB_OUTPUT |
47 | 48 | else |
48 | 49 | echo "master=false" >> $GITHUB_OUTPUT |
49 | | - echo "architectures=linux/amd64" >> $GITHUB_OUTPUT |
| 50 | + echo "architectures=linux/amd64,linux/arm64,linux/arm/v7" >> $GITHUB_OUTPUT |
50 | 51 | echo "commit-ref=${{ github.sha }}" >> $GITHUB_OUTPUT |
51 | 52 | fi |
52 | 53 |
|
@@ -74,27 +75,14 @@ jobs: |
74 | 75 | GITHUB_TOKEN: ${{ secrets.CI_TOKEN }} |
75 | 76 | if: ${{ github.event_name == 'repository_dispatch' }} |
76 | 77 |
|
77 | | - build: |
| 78 | + build-old: |
78 | 79 | runs-on: ubuntu-latest |
79 | 80 | needs: configure |
80 | 81 | strategy: |
81 | 82 | fail-fast: false |
82 | 83 | matrix: |
83 | 84 | component: |
84 | 85 | - cert-creator |
85 | | - - crd-replicator |
86 | | - - ipam |
87 | | - - liqo-controller-manager |
88 | | - - webhook |
89 | | - - uninstaller |
90 | | - - virtual-kubelet |
91 | | - - metric-agent |
92 | | - - telemetry |
93 | | - - proxy |
94 | | - - gateway |
95 | | - - gateway/wireguard |
96 | | - - gateway/geneve |
97 | | - - fabric |
98 | 86 | steps: |
99 | 87 | - name: Set architectures |
100 | 88 | id: set-architectures |
@@ -164,10 +152,63 @@ jobs: |
164 | 152 | rm -rf /tmp/.buildx-cache |
165 | 153 | mv /tmp/.buildx-cache-new /tmp/.buildx-cache |
166 | 154 |
|
| 155 | + build: |
| 156 | + runs-on: ubuntu-latest |
| 157 | + needs: configure |
| 158 | + env: |
| 159 | + DOCKER_REGISTRY: ghcr.io |
| 160 | + DOCKER_ORGANIZATION: ${{ github.repository_owner }} |
| 161 | + DOCKER_TAG: ${{ needs.configure.outputs.commit-ref }} |
| 162 | + ARCHS: ${{ needs.configure.outputs.architectures }} |
| 163 | + strategy: |
| 164 | + fail-fast: false |
| 165 | + matrix: |
| 166 | + component: |
| 167 | + - crd-replicator |
| 168 | + - ipam |
| 169 | + - liqo-controller-manager |
| 170 | + - webhook |
| 171 | + - uninstaller |
| 172 | + - virtual-kubelet |
| 173 | + - metric-agent |
| 174 | + - telemetry |
| 175 | + - proxy |
| 176 | + - gateway |
| 177 | + - gateway/wireguard |
| 178 | + - gateway/geneve |
| 179 | + - fabric |
| 180 | + steps: |
| 181 | + - name: Check out code |
| 182 | + uses: actions/checkout@v4 |
| 183 | + with: |
| 184 | + ref: "${{ needs.configure.outputs.commit-ref }}" |
| 185 | + repository: "${{ needs.configure.outputs.repo-name }}" |
| 186 | + persist-credentials: false |
| 187 | + |
| 188 | + - name: Setup Go |
| 189 | + uses: actions/setup-go@v5 |
| 190 | + with: |
| 191 | + go-version-file: go.mod |
| 192 | + cache: true |
| 193 | + cache-dependency-path: go.sum |
| 194 | + |
| 195 | + - name: Set up Docker Buildx |
| 196 | + uses: docker/setup-buildx-action@v3 |
| 197 | + |
| 198 | + - name: Login to the Container registry |
| 199 | + uses: docker/login-action@v3 |
| 200 | + with: |
| 201 | + registry: ghcr.io |
| 202 | + username: ${{ github.actor }} |
| 203 | + password: ${{ secrets.GITHUB_TOKEN }} |
167 | 204 |
|
| 205 | + - name: Build and push the container image |
| 206 | + run: | |
| 207 | + chmod +x ./build/liqo/build.sh |
| 208 | + ./build/liqo/build.sh -p ./cmd/${{ matrix.component }} |
168 | 209 | post-build: |
169 | 210 | runs-on: ubuntu-latest |
170 | | - needs: [build, configure, liqoctl] |
| 211 | + needs: [build-old, build, configure, liqoctl] |
171 | 212 | steps: |
172 | 213 |
|
173 | 214 | # Since we are using a repository-dispatch event, we have to explicitly set a run check. We update it to the actual status. |
@@ -228,12 +269,18 @@ jobs: |
228 | 269 | ref: "${{ needs.configure.outputs.commit-ref }}" |
229 | 270 | repository: "${{ needs.configure.outputs.repo-name }}" |
230 | 271 | persist-credentials: false |
| 272 | + |
| 273 | + - name: Setup Go |
| 274 | + uses: actions/setup-go@v5 |
| 275 | + with: |
| 276 | + go-version-file: go.mod |
| 277 | + cache: true |
| 278 | + cache-dependency-path: go.sum |
231 | 279 |
|
232 | 280 | - name: Build Liqoctl |
233 | 281 | run: | |
234 | 282 | ./build/liqoctl/build.sh |
235 | 283 | env: |
236 | | - CGO_ENABLED: 0 |
237 | 284 | GOOS: ${{ matrix.goos }} |
238 | 285 | GOARCH: ${{ matrix.goarch }} |
239 | 286 | LIQOCTLVERSION: ${{ needs.configure.outputs.commit-ref }} |
|
0 commit comments