vm-example #185
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |