|
1 | 1 | --- |
2 | | -name: Build NVIDIA container image |
| 2 | +name: Build container image |
3 | 3 | on: |
4 | 4 | pull_request: |
5 | 5 | branches: |
|
22 | 22 | DEFAULT_TAG: "latest" |
23 | 23 |
|
24 | 24 | concurrency: |
25 | | - group: ${{ github.workflow }}-${{ github.ref || github.run_id }} |
| 25 | + group: ${{ github.workflow }}-${{ github.ref || github.run_id }}-${{ inputs.brand_name}}-${{ inputs.stream_name }} |
26 | 26 | cancel-in-progress: true |
27 | 27 |
|
28 | 28 | jobs: |
29 | 29 | build_push: |
30 | | - name: Build and push NVIDIA image |
| 30 | + name: Build and push image |
31 | 31 | runs-on: ubuntu-24.04 |
32 | 32 |
|
33 | 33 | permissions: |
34 | 34 | contents: read |
35 | 35 | packages: write |
36 | 36 | id-token: write |
37 | 37 |
|
| 38 | + strategy: |
| 39 | + fail-fast: false |
| 40 | + matrix: |
| 41 | + variant: |
| 42 | + - base_image: "ghcr.io/ublue-os/bluefin-dx:stable-daily" |
| 43 | + tag_suffix: "" |
| 44 | + - base_image: "ghcr.io/ublue-os/bluefin-dx-nvidia:stable-daily" |
| 45 | + tag_suffix: "-nvidia" |
| 46 | + |
38 | 47 | steps: |
39 | 48 | - name: Prepare environment |
40 | 49 | run: | |
@@ -80,12 +89,13 @@ jobs: |
80 | 89 | with: |
81 | 90 | # This generates all the tags for your image, you can add custom tags here too! |
82 | 91 | # Default tags are "$DEFAULT_TAG" and "$DEFAULT_TAG.$date". |
| 92 | + # Matrix tag_suffix is appended to differentiate variants (e.g., latest vs latest-nvidia) |
83 | 93 | tags: | |
84 | | - type=raw,value=${{ env.DEFAULT_TAG }}-nvidia |
85 | | - type=raw,value=${{ env.DEFAULT_TAG }}-nvidia.{{date 'YYYYMMDD'}} |
86 | | - type=raw,value={{date 'YYYYMMDD'}}-nvidia |
87 | | - type=sha,enable=${{ github.event_name == 'pull_request' }},suffix=-nvidia |
88 | | - type=ref,event=pr,suffix=-nvidia |
| 94 | + type=raw,value=${{ env.DEFAULT_TAG }}${{ matrix.variant.tag_suffix }} |
| 95 | + type=raw,value=${{ env.DEFAULT_TAG }}${{ matrix.variant.tag_suffix }}.{{date 'YYYYMMDD'}} |
| 96 | + type=raw,value={{date 'YYYYMMDD'}}${{ matrix.variant.tag_suffix }} |
| 97 | + type=sha,enable=${{ github.event_name == 'pull_request' }},suffix=${{ matrix.variant.tag_suffix }} |
| 98 | + type=ref,event=pr,suffix=${{ matrix.variant.tag_suffix }} |
89 | 99 | labels: | |
90 | 100 | io.artifacthub.package.readme-url=https://raw.githubusercontent.com/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}/refs/heads/main/README.md |
91 | 101 | org.opencontainers.image.created=${{ steps.date.outputs.date }} |
@@ -117,7 +127,7 @@ jobs: |
117 | 127 | tags: ${{ steps.metadata.outputs.tags }} |
118 | 128 | labels: ${{ steps.metadata.outputs.labels }} |
119 | 129 | build-args: | |
120 | | - BASE_IMAGE=ghcr.io/ublue-os/bluefin-dx-nvidia:stable-daily |
| 130 | + BASE_IMAGE=${{ matrix.variant.base_image }} |
121 | 131 | oci: false |
122 | 132 |
|
123 | 133 | # Rechunk is a script that we use on Universal Blue to make sure there isnt a single huge layer when your image gets published. |
|
0 commit comments