|
29 | 29 | esac |
30 | 30 | echo "##" >> "$GITHUB_OUTPUT" |
31 | 31 |
|
32 | | - build-amd64: |
33 | | - name: Build Container Image and Helm Chart - amd64 |
34 | | - runs-on: ubuntu-24.04 |
| 32 | + build: |
| 33 | + strategy: |
| 34 | + matrix: |
| 35 | + arch: |
| 36 | + - amd64 |
| 37 | + - arm64 |
| 38 | + include: |
| 39 | + - arch: amd64 |
| 40 | + runner: ubuntu-24.04 |
| 41 | + - arch: arm64 |
| 42 | + runner: ubuntu-24.04-arm |
| 43 | + runs-on: ${{ matrix.runner }} |
| 44 | + name: Build Container Image |
35 | 45 | needs: prepare |
36 | 46 | env: |
37 | 47 | RELEASE_TAG: ${{ needs.prepare.outputs.release_tag }} |
@@ -74,77 +84,21 @@ jobs: |
74 | 84 | run: | |
75 | 85 | yarn parse-tag-name ${{ env.RELEASE_TAG }} ${{ github.run_id }} "catalog" |
76 | 86 |
|
77 | | - - name: Build and push UI image |
| 87 | + - name: Build image |
78 | 88 | if: ${{ github.event_name == 'push' && startsWith(github.ref_name, 'suse-ai-lifecycle-manager-') }} |
79 | 89 | run: | |
80 | 90 | yarn publish-pkgs -c -i '' -r ghcr.io -o 'leooamaral' -t "${{ env.RELEASE_TAG }}" |
81 | 91 |
|
82 | | - - name: Tag amd64 |
| 92 | + - name: Tag and Push Image |
83 | 93 | if: ${{ github.event_name == 'push' && startsWith(github.ref_name, 'suse-ai-lifecycle-manager-') }} |
84 | 94 | run: | |
85 | 95 | VERSION=${RELEASE_TAG##*-} |
86 | | - docker tag $IMAGE_NAME:$VERSION $IMAGE_NAME:$VERSION-amd64 |
87 | | - docker push $IMAGE_NAME:$VERSION-amd64 |
88 | | -
|
89 | | - build-arm64: |
90 | | - name: Build Container Image and Helm Chart - arm64 |
91 | | - runs-on: ubuntu-24.04-arm |
92 | | - needs: prepare |
93 | | - env: |
94 | | - RELEASE_TAG: ${{ needs.prepare.outputs.release_tag }} |
95 | | - permissions: |
96 | | - contents: read |
97 | | - packages: write |
98 | | - steps: |
99 | | - - name: Checkout repository |
100 | | - uses: actions/checkout@v5 |
101 | | - |
102 | | - - name: Configure Git |
103 | | - run: | |
104 | | - git config user.name 'github-actions[bot]' |
105 | | - git config user.email 'github-actions[bot]@users.noreply.github.com' |
106 | | -
|
107 | | - - name: Login to GitHub Container Registry |
108 | | - uses: docker/login-action@v3 |
109 | | - with: |
110 | | - registry: ghcr.io |
111 | | - username: ${{ github.actor }} |
112 | | - password: ${{ secrets.GITHUB_TOKEN }} |
113 | | - |
114 | | - - name: Setup Nodejs with yarn caching |
115 | | - uses: actions/setup-node@v5 |
116 | | - with: |
117 | | - node-version: '20' |
118 | | - cache: yarn |
119 | | - |
120 | | - - name: Enable Corepack |
121 | | - run: corepack enable |
122 | | - |
123 | | - - name: Install dependencies |
124 | | - run: yarn |
125 | | - |
126 | | - - name: Parse Extension Name |
127 | | - if: ${{ github.event_name == 'push' && startsWith(github.ref_name, 'suse-ai-lifecycle-manager-') }} |
128 | | - id: parsed-name |
129 | | - env: |
130 | | - GH_TOKEN: ${{ github.token }} |
131 | | - run: | |
132 | | - yarn parse-tag-name ${{ env.RELEASE_TAG }} ${{ github.run_id }} "catalog" |
133 | | -
|
134 | | - - name: Build and push UI image |
135 | | - if: ${{ github.event_name == 'push' && startsWith(github.ref_name, 'suse-ai-lifecycle-manager-') }} |
136 | | - run: | |
137 | | - yarn publish-pkgs -c -i '' -r ghcr.io -o 'leooamaral' -t "${{ env.RELEASE_TAG }}" |
138 | | -
|
139 | | - - name: Tag arm64 |
140 | | - if: ${{ github.event_name == 'push' && startsWith(github.ref_name, 'suse-ai-lifecycle-manager-') }} |
141 | | - run: | |
142 | | - VERSION=${RELEASE_TAG##*-} |
143 | | - docker tag $IMAGE_NAME:$VERSION $IMAGE_NAME:$VERSION-arm64 |
144 | | - docker push $IMAGE_NAME:$VERSION-arm64 |
| 96 | + docker tag $IMAGE_NAME:$VERSION $IMAGE_NAME:$VERSION-${{ matrix.arch }} |
| 97 | + docker push $IMAGE_NAME:$VERSION-${{ matrix.arch }} |
145 | 98 |
|
146 | 99 | manifest: |
147 | | - needs: [prepare, build-amd64, build-arm64] |
| 100 | + name: Create Container Manifest and Helm Chart |
| 101 | + needs: [prepare, build] |
148 | 102 | env: |
149 | 103 | RELEASE_TAG: ${{ needs.prepare.outputs.release_tag }} |
150 | 104 | runs-on: ubuntu-latest |
|
0 commit comments