-
-
Notifications
You must be signed in to change notification settings - Fork 107
61 lines (59 loc) · 2.09 KB
/
container-build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: Docker container test
on:
workflow_call:
inputs:
variant:
required: true
type: string
architecture:
required: true
type: string
weblate_sha:
required: false
type: string
weblate_date:
required: false
type: string
jobs:
container-build:
runs-on: ${{ inputs.architecture == 'linux/arm64' && 'ubuntu-24.04-arm' || 'ubuntu-24.04' }}
name: Build, ${{ inputs.variant }}, ${{ inputs.architecture }}
env:
MATRIX_ARCHITECTURE: ${{ inputs.architecture }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Set up QEMU
if: inputs.architecture != 'linux/amd64' && inputs.architecture != 'linux/arm64'
uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 # v3.6.0
with:
platforms: ${{ inputs.architecture }}
- name: Expose GitHub Runtime
uses: crazy-max/ghaction-github-runtime@b3a9207c0e1ef41f4cf215303c976869d0c2c1c4 # v3.0.0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 # v3.10.0
with:
# renovate: datasource=github-releases depName=docker/buildx
version: v0.21.2
- name: Adjust bleeding edge image
if: inputs.variant == 'bleeding'
run: .github/bin/bleeding ${{ inputs.weblate_sha }} ${{ inputs.weblate_date }}
- name: Configure Docker build
run: .github/bin/get-buildx-args
- name: Cache
uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2
id: cache
with:
path: uv-cache
key: uv-cache-${{ hashFiles('Dockerfile') }}-${{ inputs.architecture }}
- name: inject cache into docker
uses: reproducible-containers/buildkit-cache-dance@5b6db76d1da5c8b307d5d2e0706d266521b710de # v3.1.2
with:
cache-map: |
{
"uv-cache": "/.uv-cache"
}
skip-extraction: ${{ steps.cache.outputs.cache-hit }}
- name: Build the Docker image
run: .github/bin/docker-build
permissions:
contents: read