@@ -143,6 +143,8 @@ jobs:
143143 # Combinations used to build assets
144144 # Usually only a single variant
145145 assets-matrix : ${{ steps.assets-matrix.outputs.result }}
146+ # Combinations to sync images to GHCR for
147+ sync-matrix : ${{ steps.common-matrix.outputs.result }}
146148
147149 # Select environment to deploy to based on git branch/tag
148150 environment : ${{ (github.ref_name == 'main' && 'staging') || (github.ref_name == 'prod' && 'production') }}
@@ -183,7 +185,7 @@ jobs:
183185 # https://docs.github.com/en/code-security/code-scanning/integrating-with-code-scanning/uploading-a-sarif-file-to-github
184186 github-advanced-security : ' 0'
185187
186- # Create a GitHub release for this build
188+ # Create GitHub release for this build
187189 create-release : ' 0'
188190 steps :
189191 - name : Configure common-matrix
@@ -212,9 +214,9 @@ jobs:
212214 {
213215 os: "debian",
214216 elixir: "1.19.5",
215- otp: "28.4.1 ",
216- build_os_ver: "trixie-20260316 -slim",
217- prod_os_ver: "trixie-20260316 -slim"
217+ otp: "28.4.2 ",
218+ build_os_ver: "trixie-20260406 -slim",
219+ prod_os_ver: "trixie-20260406 -slim"
218220 },
219221 ]
220222 }
@@ -228,9 +230,9 @@ jobs:
228230 {
229231 os: "debian",
230232 elixir: "1.19.5",
231- otp: "28.4.1 ",
232- build_os_ver: "trixie-20260316 -slim",
233- prod_os_ver: "trixie-20260316 -slim"
233+ otp: "28.4.2 ",
234+ build_os_ver: "trixie-20260406 -slim",
235+ prod_os_ver: "trixie-20260406 -slim"
234236 },
235237 ]
236238 let ci_nodes = [1, 2]
@@ -269,9 +271,9 @@ jobs:
269271 {
270272 os: "debian",
271273 elixir: "1.19.5",
272- otp: "28.4.1 ",
273- build_os_ver: "trixie-20260316 -slim",
274- prod_os_ver: "trixie-20260316 -slim"
274+ otp: "28.4.2 ",
275+ build_os_ver: "trixie-20260406 -slim",
276+ prod_os_ver: "trixie-20260406 -slim"
275277 },
276278 ]
277279 }
@@ -286,9 +288,9 @@ jobs:
286288 {
287289 os: "debian",
288290 elixir: "1.19.5",
289- otp: "28.4.1 ",
290- build_os_ver: "trixie-20260316 -slim",
291- prod_os_ver: "trixie-20260316 -slim"
291+ otp: "28.4.2 ",
292+ build_os_ver: "trixie-20260406 -slim",
293+ prod_os_ver: "trixie-20260406 -slim"
292294 },
293295 ]
294296 }
@@ -303,9 +305,9 @@ jobs:
303305 {
304306 os: "debian",
305307 elixir: "1.19.5",
306- otp: "28.4.1 ",
307- build_os_ver: "trixie-20260316 -slim",
308- prod_os_ver: "trixie-20260316 -slim"
308+ otp: "28.4.2 ",
309+ build_os_ver: "trixie-20260406 -slim",
310+ prod_os_ver: "trixie-20260406 -slim"
309311 },
310312 ]
311313 }
@@ -1833,6 +1835,53 @@ jobs:
18331835 # --s3-location "bucket=${CODEDEPLOY_BUCKET},key=${REVISION_FILE},bundleType=zip" \
18341836 # --description "App ${RELEASE_TAG} ${RELEASE_TIMESTAMP} ${GITHUB_SHA_SHORT}"
18351837
1838+ # Copy Elixir images to GHCR
1839+ # Avoids rate limits and speeds up pull performance
1840+ sync-images-elixir :
1841+ name : Sync Elixir base images
1842+ needs : [config]
1843+ if : needs.config.outputs.sync-images == '1'
1844+ permissions :
1845+ id-token : write
1846+ contents : read
1847+ packages : write
1848+ runs-on : ubuntu-latest
1849+ environment : ${{ needs.config.outputs.environment }}
1850+ strategy :
1851+ fail-fast : false
1852+ matrix : ${{ fromJson(needs.config.outputs.sync-matrix) }}
1853+ env :
1854+ ELIXIR_BASE_TAG : ${{ matrix.elixir }}-erlang-${{ matrix.otp }}-${{ matrix.os }}-${{ matrix.build_os_ver }}
1855+ MATRIX_OS : ${{ matrix.os }}
1856+ MATRIX_PROD_OS_VER : ${{ matrix.prod_os_ver }}
1857+ steps :
1858+ - name : Log in to GHCR
1859+ uses : docker/login-action@v4
1860+ with :
1861+ registry : ghcr.io
1862+ username : ${{ github.actor }}
1863+ password : ${{ secrets.GITHUB_TOKEN }}
1864+
1865+ # Pull public images without rate limits
1866+ - name : Log in to Docker Hub
1867+ uses : docker/login-action@v4
1868+ with :
1869+ username : ${{ secrets.DOCKERHUB_USERNAME }}
1870+ password : ${{ secrets.DOCKERHUB_TOKEN }}
1871+
1872+ - name : Check out source
1873+ uses : actions/checkout@v6
1874+
1875+ # https://github.com/regclient/actions
1876+ - name : Install regsync
1877+ uses : regclient/actions/regsync-installer@v0.1.0
1878+ with :
1879+ release : ' v0.11.1' # optional version
1880+
1881+ - name : Sync Elxir and OS base images to GHCR
1882+ run : regsync once -c deploy/regsync-ghcr-matrix.yml
1883+
1884+
18361885 # Copy 3rd-party images to GHCR and ECR
18371886 # Avoids rate limits and speeds up pull performance
18381887 sync-images :
0 commit comments