Skip to content

Commit

Permalink
Replace with composite workflow for building images
Browse files Browse the repository at this point in the history
  • Loading branch information
rnijveld committed May 29, 2024
1 parent 17c384b commit fada650
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 55 deletions.
50 changes: 0 additions & 50 deletions .github/workflows/docker-images.yml

This file was deleted.

54 changes: 49 additions & 5 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ jobs:

build:
needs: [prebuild-diesel, prebuild-cargo-llvm-lines]
env:
node_version: "20"
strategy:
matrix:
include:
Expand All @@ -99,8 +101,50 @@ jobs:
latest: true
- version: 1.76
latest: false
uses: "./.github/workflows/docker-images.yml"
with:
version: ${{ matrix.version }}
latest: ${{ matrix.latest }}
node_version: "20"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6

- name: Download prebuild binaries
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
with:
pattern: artifact-*
merge-multiple: true

- name: Build base image
uses: tweedegolf/build-container-image@main
with:
token: ${{ secrets.GITHUB_TOKEN }}
push: ${{ github.ref == 'refs/heads/main' }}
platforms: "linux/amd64,linux/arm64"
build-args: |
RUSTUP_VERSION=1.27.0
RUSTUP_SHA256_AMD64=a3d541a5484c8fa2f1c21478a6f6c505a778d473c21d60a18a4df5185d320ef8
RUSTUP_SHA256_ARM64=76cd420cb8a82e540025c5f97bda3c65ceb0b0661d5843e6ef177479813b0367
CARGO_BINSTALL_VERSION=1.6.4
CARGO_BINSTALL_SHA256_AMD64=b07160c21cdfcc24c3afe94b3cb12bf6d111cef7b218cce85a0c1dfae7e106dd
CARGO_BINSTALL_SHA256_ARM64=70c17459e4bc0b417679e66af55199603d80fa751d819b86713f700e3e9a6602
SCCACHE_VERSION=0.7.7
SCCACHE_SHA256_AMD64=ed0010b4dcaccce42b9dc8699257134a113d0ca16dfb7db890356135218322c9
SCCACHE_SHA256_ARM64=e7ecabac9a703e53a8b06e84b0058fcf242239d164050537bc399387160320fb
CARGO_UDEPS_VERSION=0.1.47
CARGO_UDEPS_SHA256_AMD64=906d6f7292231b79d2db04ab04d5e188b6ac789bce7fbb3013130edb82f683c9
CARGO_UDEPS_SHA256_ARM64=b242da4b7c24c647e210fbacabafe7dd86161d04e261bd81ed07a0a466a06fee
RUST_VERSION=${{matrix.version}}
tags: |
ghcr.io/tweedegolf/rust-dev:${{matrix.version}}
${{ matrix.latest && 'ghcr.io/tweedegolf/rust-dev:latest' || '' }}
- name: Build node.js image variant
uses: tweedegolf/build-container-image@main
with:
token: ${{ secrets.GITHUB_TOKEN }}
push: ${{ github.ref == 'refs/heads/main' }}
platforms: "linux/amd64,linux/arm64"
file: Dockerfile-node
build-args: |
RUST_VERSION=${{matrix.version}}
NODE_VERSION=${{env.node_version}}
tags: |
ghcr.io/tweedegolf/rust-dev:${{matrix.version}}-node
${{ matrix.latest && 'ghcr.io/tweedegolf/rust-dev:latest-node' || '' }}

0 comments on commit fada650

Please sign in to comment.