-
Notifications
You must be signed in to change notification settings - Fork 0
72 lines (68 loc) · 1.72 KB
/
ci.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
62
63
64
65
66
67
68
69
70
71
72
name: 'oci-image'
on:
push:
branches: main
pull_request:
jobs:
docker-buildx:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# test with nonstandard uid and gid
build-args:
- |
UID=1234
GID=1235
- |
UID=1000
GID=1000
- ''
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- uses: actions/checkout@v4
with:
submodules: true
- name: Build and load
uses: docker/build-push-action@v5
with:
context: .
file: Containerfile
build-args: ${{ matrix.build-args }}
load: true
tags: l7/nvim:latest
# could enable push to gh registry
push: false
cache-from: type=gha
cache-to: type=gha,mode=max
test-make:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
cmd:
- ''
- docker
- podman
os:
- ubuntu-20.04
- ubuntu-22.04
- ubuntu-24.04
steps:
- uses: actions/checkout@v4
with:
submodules: true
- run: make IMAGE_NAME=localhost/foo IMAGE_TAG=bar CMD=${{ matrix.cmd }}
if: ${{ matrix.cmd != '' }}
env:
CMD: ${{ matrix.cmd }}
- run: make IMAGE_NAME=localhost/foo IMAGE_TAG=bar
if: ${{ matrix.cmd == '' }}
- run: ${{ matrix.cmd }} image inspect localhost/foo:bar
if: ${{ matrix.cmd != '' }}
- run: podman image inspect localhost/foo:bar
if: ${{ matrix.cmd == '' }}
- run: make test