@@ -23,22 +23,31 @@ concurrency:
2323
2424env :
2525 # Also remember to change the 'docker/build.sh' script
26- REGISTRY_IMAGE : " ghcr.io/lifting-bits/cxx-common/vcpkg-builder-ubuntu-22.04-v2"
26+ # NOTE: Setting the environment variable here isn't ideal because we
27+ # can't use any matrix variables here, and in the future we will probably
28+ # want to support building multiple Ubuntu versions
29+ REGISTRY_IMAGE_ROOT : " "
2730
2831jobs :
2932 build :
3033 runs-on : ubuntu-latest
34+ env :
35+ # This needs to be the same as in the `merge` job
36+ REGISTRY_IMAGE : ghcr.io/lifting-bits/cxx-common/vcpkg-builder-ubuntu-${{ matrix.ubuntu_version }}
3137 strategy :
3238 fail-fast : false
3339 matrix :
3440 platform :
3541 - linux/amd64
3642 - linux/arm64
43+ ubuntu_version :
44+ - 22.04
45+ - 24.04
3746 steps :
3847 - name : Prepare
3948 run : |
40- platform=${{ matrix.platform }}
41- echo "PLATFORM_PAIR=${platform//\//-}" >> $ GITHUB_ENV
49+ platform=" ${{ matrix.platform }}"
50+ echo "PLATFORM_PAIR=${platform//\//-}" >> "${ GITHUB_ENV}"
4251
4352 - name : Checkout
4453 uses : actions/checkout@v4
@@ -71,17 +80,17 @@ jobs:
7180 platforms : ${{ matrix.platform }}
7281 labels : ${{ steps.meta.outputs.labels }}
7382 outputs : type=image,name=${{ env.REGISTRY_IMAGE }},push-by-digest=true,name-canonical=true,push=true
74- -
75- name : Export digest
83+
84+ - name : Export digest
7685 run : |
7786 mkdir -p /tmp/digests
7887 digest="${{ steps.build.outputs.digest }}"
7988 touch "/tmp/digests/${digest#sha256:}"
80- -
81- name : Upload digest
89+
90+ - name : Upload digest
8291 uses : actions/upload-artifact@v4
8392 with :
84- name : digests-${{ env.PLATFORM_PAIR }}
93+ name : digests-${{ matrix.ubuntu_version }}-${{ env.PLATFORM_PAIR }}
8594 path : /tmp/digests/*
8695 if-no-files-found : error
8796 retention-days : 1
@@ -90,12 +99,21 @@ jobs:
9099 runs-on : ubuntu-latest
91100 needs :
92101 - build
102+ env :
103+ # This needs to be the same as in the `build` job
104+ REGISTRY_IMAGE : ghcr.io/lifting-bits/cxx-common/vcpkg-builder-ubuntu-${{ matrix.ubuntu_version }}
105+ strategy :
106+ fail-fast : false
107+ matrix :
108+ ubuntu_version :
109+ - 22.04
110+ - 24.04
93111 steps :
94112 - name : Download digests
95113 uses : actions/download-artifact@v4
96114 with :
97115 path : /tmp/digests
98- pattern : digests-*
116+ pattern : digests-${{ matrix.ubuntu_version }}- *
99117 merge-multiple : true
100118
101119 - name : Set up Docker Buildx
@@ -117,8 +135,8 @@ jobs:
117135 - name : Create manifest list and push
118136 working-directory : /tmp/digests
119137 run : |
120- docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
121- $(printf '${{ env.REGISTRY_IMAGE }}@sha256:%s ' *)
138+ docker buildx imagetools create " $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON")" \
139+ " $(printf '${{ env.REGISTRY_IMAGE }}@sha256:%s ' *)"
122140
123141 - name : Inspect image
124142 run : |
0 commit comments