-
Notifications
You must be signed in to change notification settings - Fork 5
132 lines (119 loc) · 3.74 KB
/
ci.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
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
ci:
runs-on: ubuntu-latest
services:
registry:
image: ghcr.io/project-zot/zot-linux-amd64:latest
ports:
- 5000:5000
name: Test stacker-build-push-action
steps:
- uses: actions/checkout@v2
- name: Run stacker-build with a Dockerfile
uses: ./
with:
dockerfile: 'test/Dockerfile'
tags: v1 latest
url: docker://localhost:5000/four/app
layer-type: 'tar squashfs'
skip-tls: true
- name: Run stacker-build with all build inputs
uses: ./
with:
file: 'test/stacker.yaml'
build-args: |
SUB1=VAR1
SUB2=VAR2
SUB3=VAR3
layer-type: 'tar squashfs'
- name: Run stacker-build with only build-args
uses: ./
with:
file: 'test/stacker.yaml'
build-args: |
SUB1=VAR1
SUB2=VAR2
SUB3=VAR3
- name: Run stacker-build with only layer-type
uses: ./
with:
file: 'test/stacker_wo_subs.yaml'
layer-type: 'tar squashfs'
- name: Run stacker-build with only file input
uses: ./
with:
file: 'test/stacker_wo_subs.yaml'
- name: Run stacker-build with push and tags
uses: ./
with:
file: 'test/stacker_wo_subs.yaml'
tags: v1 latest
url: docker://localhost:5000/one/app
skip-tls: true
- name: Run stacker-build with push, tags and build-args
uses: ./
with:
file: 'test/stacker.yaml'
build-args: |
SUB1=VAR1
SUB2=VAR2
SUB3=VAR3
tags: v1 latest
url: docker://localhost:5000/two/app
skip-tls: true
- name: Run stacker-build with push, tags, build-args and layer-type
uses: ./
with:
file: 'test/stacker.yaml'
build-args: |
SUB1=VAR1
SUB2=VAR2
SUB3=VAR3
tags: v1 latest
url: docker://localhost:5000/three/app
layer-type: 'tar squashfs'
skip-tls: true
- name: Run stacker recursive-build
uses: ./
with:
dir: 'test/builds'
tags: v2
url: docker://localhost:5000/five/app
layer-type: 'tar squashfs'
skip-tls: true
- name: Run stacker-build with push, tags, build-args and layer-type(squashfs)
uses: ./
with:
file: 'test/stacker.yaml'
build-args: |
SUB1=VAR1
SUB2=VAR2
SUB3=VAR3
tags: v1 latest
url: docker://localhost:5000/six/app
layer-type: 'squashfs'
skip-tls: true
- name: Check images were published
run: |
docker pull localhost:5000/one/app/test:v1
docker pull localhost:5000/one/app/test
docker pull localhost:5000/two/app/test:v1
docker pull localhost:5000/two/app/test
docker pull localhost:5000/three/app/test:v1
docker pull localhost:5000/three/app/test
docker pull localhost:5000/four/app/app:v1
docker pull localhost:5000/four/app/app
docker pull localhost:5000/five/app/layer3_1:v2
docker pull localhost:5000/five/app/layer3_1:v2
# check squashfs
curl http://localhost:5000/v2/six/app/test/manifests/v1-squashfs
curl http://localhost:5000/v2/six/app/test/manifests/latest-squashfs
curl http://localhost:5000/v2/five/app/layer3_2/manifests/v2-squashfs
curl http://localhost:5000/v2/five/app/layer3_1/manifests/v2-squashfs