-
Notifications
You must be signed in to change notification settings - Fork 32
37 lines (37 loc) · 1.26 KB
/
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
name: Build
on:
push:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- image: 22.04
suffix:
- image: 18.04
suffix: -18.04
# Some older clangs (<10) needs to be an older glibc, as comes with 18.04 in order to build 9.* and earlier.
# otherwise we somehow need to apply 947f9692440836dcb8d88b74b69dd379d85974ce to get the sanitizer
# to build.
steps:
- name: Docker Setup Buildx
uses: docker/setup-buildx-action@v3
- name: Docker Login
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Build and push to Docker Hub
id: hub_build
uses: docker/build-push-action@v6
with:
push: ${{ github.ref == 'refs/heads/main' && 'true' || 'false' }}
tags: compilerexplorer/clang${{ matrix.suffix }}-builder:latest
cache-from: type=registry,ref=compilerexplorer/clang${{ matrix.suffix }}-builder:latest
cache-to: type=inline,mode=max
file: Dockerfile
build-args: image=${{ matrix.image }}
- name: Docker Hub Image Digest
run: echo ${{ steps.hub_build.outputs.digest }}