-
-
Notifications
You must be signed in to change notification settings - Fork 187
38 lines (36 loc) · 1.12 KB
/
docker.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
name: Docker Build
on:
pull_request:
branches: [ main ]
workflow_dispatch:
jobs:
docker-build:
runs-on: ubuntu-latest
services:
registry:
image: registry:2
ports:
- '5000:5000'
steps:
- name: Set up QEMU
uses: docker/[email protected]
- name: Set up Docker Buildx
id: buildx
uses: docker/[email protected]
with:
version: v0.14.1
driver-opts: |
image=moby/buildkit:buildx-stable-1
network=host
- name: Available platforms
run: echo {{ `${{ steps.buildx.outputs.platforms }}` }}
- run: docker info && docker version
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Build & Push (local CI registry)
run: |
set -ex
make docker-multi COMMIT=${{ github.sha }} DOCKER_REPO=localhost:5000/gomplate BUILDX_ACTION=--push
docker buildx imagetools create --dry-run -t localhost:5000/gomplate:dev localhost:5000/gomplate:latest
docker buildx imagetools create --dry-run -t localhost:5000/gomplate:dev-alpine localhost:5000/gomplate:alpine