|
10 | 10 | branches:
|
11 | 11 | - master
|
12 | 12 |
|
| 13 | +env: |
| 14 | + GHCR_IMAGE: donkie/spoolman |
| 15 | + |
13 | 16 | jobs:
|
14 | 17 | #
|
15 | 18 | # Linting
|
@@ -128,20 +131,20 @@ jobs:
|
128 | 131 |
|
129 | 132 | with:
|
130 | 133 | context: .
|
131 |
| - tags: ${{ vars.GHCR_IMAGE }}:test |
| 134 | + tags: ${{ env.GHCR_IMAGE }}:test |
132 | 135 | outputs: type=docker,dest=/tmp/spoolman.tar
|
133 |
| - cache-from: type=registry,ref=ghcr.io/${{ vars.GHCR_IMAGE }}:buildcache-amd64 |
134 |
| - cache-to: type=registry,ref=ghcr.io/${{ vars.GHCR_IMAGE }}:buildcache-amd64,mode=max |
| 136 | + cache-from: type=registry,ref=ghcr.io/${{ env.GHCR_IMAGE }}:buildcache-amd64 |
| 137 | + cache-to: type=registry,ref=ghcr.io/${{ env.GHCR_IMAGE }}:buildcache-amd64,mode=max |
135 | 138 |
|
136 | 139 | # Separate build for pull requests since PRs dont have access to store cache
|
137 | 140 | - name: Build Spoolman (PR)
|
138 | 141 | if: ${{ github.event_name == 'pull_request' }}
|
139 | 142 |
|
140 | 143 | with:
|
141 | 144 | context: .
|
142 |
| - tags: ${{ vars.GHCR_IMAGE }}:test |
| 145 | + tags: ${{ env.GHCR_IMAGE }}:test |
143 | 146 | outputs: type=docker,dest=/tmp/spoolman.tar
|
144 |
| - cache-from: type=registry,ref=ghcr.io/${{ vars.GHCR_IMAGE }}:buildcache-amd64 |
| 147 | + cache-from: type=registry,ref=ghcr.io/${{ env.GHCR_IMAGE }}:buildcache-amd64 |
145 | 148 |
|
146 | 149 | - name: Upload artifact
|
147 | 150 |
|
@@ -172,20 +175,20 @@ jobs:
|
172 | 175 |
|
173 | 176 | with:
|
174 | 177 | context: ./tests_integration
|
175 |
| - tags: ${{ vars.GHCR_IMAGE }}-tester:latest |
| 178 | + tags: ${{ env.GHCR_IMAGE }}-tester:latest |
176 | 179 | outputs: type=docker,dest=/tmp/spoolman-tester.tar
|
177 |
| - cache-from: type=registry,ref=ghcr.io/${{ vars.GHCR_IMAGE }}:buildcache-tester |
178 |
| - cache-to: type=registry,ref=ghcr.io/${{ vars.GHCR_IMAGE }}:buildcache-tester,mode=max |
| 180 | + cache-from: type=registry,ref=ghcr.io/${{ env.GHCR_IMAGE }}:buildcache-tester |
| 181 | + cache-to: type=registry,ref=ghcr.io/${{ env.GHCR_IMAGE }}:buildcache-tester,mode=max |
179 | 182 |
|
180 | 183 | # Separate build for pull requests since PRs dont have access to store cache
|
181 | 184 | - name: Build Spoolman Tester (PR)
|
182 | 185 | if: ${{ github.event_name == 'pull_request' }}
|
183 | 186 |
|
184 | 187 | with:
|
185 | 188 | context: ./tests_integration
|
186 |
| - tags: ${{ vars.GHCR_IMAGE }}-tester:latest |
| 189 | + tags: ${{ env.GHCR_IMAGE }}-tester:latest |
187 | 190 | outputs: type=docker,dest=/tmp/spoolman-tester.tar
|
188 |
| - cache-from: type=registry,ref=ghcr.io/${{ vars.GHCR_IMAGE }}:buildcache-tester |
| 191 | + cache-from: type=registry,ref=ghcr.io/${{ env.GHCR_IMAGE }}:buildcache-tester |
189 | 192 |
|
190 | 193 | - name: Upload artifact
|
191 | 194 |
|
@@ -259,8 +262,8 @@ jobs:
|
259 | 262 | with:
|
260 | 263 | context: .
|
261 | 264 | platforms: linux/arm64
|
262 |
| - cache-from: type=registry,ref=ghcr.io/${{ vars.GHCR_IMAGE }}:buildcache-arm64 |
263 |
| - cache-to: type=registry,ref=ghcr.io/${{ vars.GHCR_IMAGE }}:buildcache-arm64,mode=max |
| 265 | + cache-from: type=registry,ref=ghcr.io/${{ env.GHCR_IMAGE }}:buildcache-arm64 |
| 266 | + cache-to: type=registry,ref=ghcr.io/${{ env.GHCR_IMAGE }}:buildcache-arm64,mode=max |
264 | 267 | #
|
265 | 268 | # Build arm/v7 image
|
266 | 269 | # Don't run this for pull requests
|
@@ -298,8 +301,8 @@ jobs:
|
298 | 301 | with:
|
299 | 302 | context: .
|
300 | 303 | platforms: linux/arm/v7
|
301 |
| - cache-from: type=registry,ref=ghcr.io/${{ vars.GHCR_IMAGE }}:buildcache-armv7 |
302 |
| - cache-to: type=registry,ref=ghcr.io/${{ vars.GHCR_IMAGE }}:buildcache-armv7,mode=max |
| 304 | + cache-from: type=registry,ref=ghcr.io/${{ env.GHCR_IMAGE }}:buildcache-armv7 |
| 305 | + cache-to: type=registry,ref=ghcr.io/${{ env.GHCR_IMAGE }}:buildcache-armv7,mode=max |
303 | 306 | #
|
304 | 307 | # Release images GHCR and Docker Hub if tests pass
|
305 | 308 | # Don't run this for pull requests
|
@@ -336,7 +339,7 @@ jobs:
|
336 | 339 |
|
337 | 340 | with:
|
338 | 341 | images: |
|
339 |
| - ghcr.io/${{ vars.GHCR_IMAGE }} |
| 342 | + ghcr.io/${{ env.GHCR_IMAGE }} |
340 | 343 | tags: |
|
341 | 344 | type=edge
|
342 | 345 | type=semver,pattern={{version}}
|
@@ -381,9 +384,9 @@ jobs:
|
381 | 384 | GIT_COMMIT
|
382 | 385 | BUILD_DATE
|
383 | 386 | cache-from: |
|
384 |
| - type=registry,ref=ghcr.io/${{ vars.GHCR_IMAGE }}:buildcache-amd64 |
385 |
| - type=registry,ref=ghcr.io/${{ vars.GHCR_IMAGE }}:buildcache-arm64 |
386 |
| - type=registry,ref=ghcr.io/${{ vars.GHCR_IMAGE }}:buildcache-armv7 |
| 387 | + type=registry,ref=ghcr.io/${{ env.GHCR_IMAGE }}:buildcache-amd64 |
| 388 | + type=registry,ref=ghcr.io/${{ env.GHCR_IMAGE }}:buildcache-arm64 |
| 389 | + type=registry,ref=ghcr.io/${{ env.GHCR_IMAGE }}:buildcache-armv7 |
387 | 390 | #
|
388 | 391 | # Create Github Release if CI was triggered by a tag
|
389 | 392 | #
|
|
0 commit comments