-
Notifications
You must be signed in to change notification settings - Fork 113
41 lines (34 loc) · 1.29 KB
/
base-images.yaml
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
name: Base images build
on:
schedule:
- cron: '0 3 * * *' # 3 AM UTC = before the nightly build
workflow_dispatch: # Manual trigger
jobs:
base-image-build:
if: ${{ github.event_name == 'workflow_dispatch' || github.repository == 'shipwright-io/build' }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
image:
- base
- git
- image-processing
- waiter
# We cannot run in parallel because the base image must be built first
max-parallel: 1
steps:
- uses: actions/checkout@v3
# https://github.com/docker/setup-qemu-action
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
# https://github.com/docker/setup-buildx-action
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to container registry
run: echo ${{ secrets.GITHUB_TOKEN }} | docker login -u ${{ github.repository_owner }} --password-stdin ghcr.io
- name: Build Image
working-directory: images/${{ matrix.image }}
run: |
NAMESPACE=$(tr '[:upper:]' '[:lower:]' <<<${{ github.repository_owner }})
IMAGE=ghcr.io/${NAMESPACE}/base-${{ matrix.image }} NAMESPACE="${NAMESPACE}" docker buildx bake --push -f ../docker-bake.hcl