Skip to content

CI(vm-example): tune the job #93

CI(vm-example): tune the job

CI(vm-example): tune the job #93

Workflow file for this run

name: vm-example
on:
schedule:
- cron: '42 4 * * 2' # run once a week
workflow_dispatch: # adds ability to run this manually
pull_request:
paths:
- '.github/workflows/vm-example.yaml'
jobs:
vm-example:
strategy:
fail-fast: true
matrix:
image:
- alpine:3.19
- debian:11
- debian:12
- postgres:14-alpine
- postgres:15-alpine
- postgres:16-alpine
- ubuntu:22.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
timeout-minutes: 10
with:
go-version-file: 'go.mod'
# Disable cache on self-hosted runners to avoid /usr/bin/tar errors, see https://github.com/actions/setup-go/issues/403
cache: false
- 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-${{ matrix.image }}
run: bin/vm-builder -src ${{ matrix.image }} -dst neondatabase/vm-${{ matrix.image }}
- name: push vm-${{ matrix.image }}
if: github.event_name != 'pull_request'
run: docker push -q neondatabase/vm-${{ matrix.image }}