-
Notifications
You must be signed in to change notification settings - Fork 27
65 lines (52 loc) · 2.13 KB
/
vm-example.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
name: vm-example
on:
schedule:
- cron: '42 4 * * 2' # run once a week
pull_request:
paths:
- ".github/workflows/vm-example.yaml"
workflow_dispatch: # adds ability to run this manually
env:
TARGET_ARCH: amd64
jobs:
vm-example:
runs-on: ubuntu-latest
steps:
- name: git checkout
uses: actions/checkout@v4
- name: install golang
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
timeout-minutes: 10
- name: build daemon
run: make docker-build-daemon
- name: build vm-builder
run: make bin/vm-builder
- name: docker - setup buildx
uses: docker/setup-buildx-action@v3
- name: login to docker hub
uses: docker/login-action@v3
with:
username: ${{ secrets.NEON_DOCKERHUB_USERNAME }}
password: ${{ secrets.NEON_DOCKERHUB_PASSWORD }}
- name: build vm-alpine:3.16
run: bin/vm-builder -src alpine:3.16 -dst neondatabase/vm-alpine:3.16 -target-arch linux/${TARGET_ARCH}
- name: push vm-alpine:3.16
run: docker push -q neondatabase/vm-alpine:3.16
- name: build vm-ubuntu:22.04
run: bin/vm-builder -src ubuntu:22.04 -dst neondatabase/vm-ubuntu:22.04 -target-arch linux/${TARGET_ARCH}
- name: push vm-ubuntu:22.04
run: docker push -q neondatabase/vm-ubuntu:22.04
- name: build vm-debian:11
run: bin/vm-builder -src debian:11 -dst neondatabase/vm-debian:11 -target-arch linux/${TARGET_ARCH}
- name: push vm-debian:11
run: docker push -q neondatabase/vm-debian:11
- name: build vm-postgres:14-alpine
run: bin/vm-builder -src postgres:14-alpine -dst neondatabase/vm-postgres:14-alpine -target-arch linux/${TARGET_ARCH}
- name: push vm-postgres:14-alpine
run: docker push -q neondatabase/vm-postgres:14-alpine
- name: build vm-postgres:15-alpine
run: bin/vm-builder -src postgres:15-alpine -dst neondatabase/vm-postgres:15-alpine -target-arch linux/${TARGET_ARCH}
- name: push vm-postgres:15-alpine
run: docker push -q neondatabase/vm-postgres:15-alpine