-
Notifications
You must be signed in to change notification settings - Fork 1
40 lines (37 loc) · 1.43 KB
/
docker-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
---
# for now we'll just lean on QEMU via Docker BuildX to create multi-arch
# images, since we don't have arm64 rigs in the CI farm (er... rather, GitHub
# doesn't, and we don't have custom in-house runners) to build on.
#
# one day, whether it's on GH Actions or a custom CI system, the ideal (read:
# often 3-6x faster for crunch-heavy loads like compiling C++ stuff, like
# Watchman) world would be to build images on their native arch, push to an
# intermediate tag, then combine them into a manifest manually with a process
# like
# http://web.archive.org/web/20220303000513/https://piers.rocks/docker/containers/manifests/2018/11/02/using-docker-manifests-for-multiple-archs.html
name: docker-build
on:
push:
tags:
- 'v*'
jobs:
sorbet:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ github.token }}
- name: Build Images
# we're boldly assuming we release slowly enough that IS_LATEST will
# never cause a collision
run: make IS_LATEST=1 PUSH=1 SEATRIAL_VERSION=${{github.ref_name}} buildx-image