-
Notifications
You must be signed in to change notification settings - Fork 0
/
.build.yml
39 lines (39 loc) · 1.49 KB
/
.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
image: alpine/edge
packages:
- podman
secrets:
- d45b9b20-bc8b-480e-8e6e-edb5e0fd5848 # podman auth
tasks:
- setup: |
sudo rc-service cgroups start
sudo modprobe tun
sudo chmod o+rw /dev/net/tun
echo build:100000:65536 | sudo tee /etc/subuid
echo build:100000:65536 | sudo tee /etc/subgid
- build: |
podman build sparkles/ -t ghcr.io/xdavidwu/sparkles:latest \
-f sparkles/containers/Containerfile
- build-busybox: |
podman build sparkles/ -t ghcr.io/xdavidwu/sparkles/busybox:latest \
-f sparkles/containers/Containerfile.busybox
- build-kubectl-shell: |
podman run -v .:/work cgr.dev/chainguard/apko:latest \
build /work/sparkles/containers/kubectl-shell.apko.yaml kubectl-shell \
/work/kubectl-shell.tar
podman load -i kubectl-shell.tar
- build-sftp-server: |
podman run -v .:/work cgr.dev/chainguard/apko:latest \
build /work/sparkles/containers/sftp-server.apko.yaml sftp-server \
/work/sftp-server.tar
podman load -i sftp-server.tar
- publish: |
if [ "$GIT_REF" != refs/heads/main ]; then
printf 'Skipping push on ref %s\n' "$GIT_REF"
else
podman push ghcr.io/xdavidwu/sparkles:latest
podman push ghcr.io/xdavidwu/sparkles/busybox:latest
podman push kubectl-shell:latest-amd64 \
ghcr.io/xdavidwu/sparkles/kubectl-shell:latest
podman push sftp-server:latest-amd64 \
ghcr.io/xdavidwu/sparkles/sftp-server:latest
fi