Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 25 additions & 30 deletions .github/workflows/vm-example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,34 @@ 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

- name: git checkout
uses: actions/checkout@v4

- name: install golang
uses: actions/setup-go@v5
- uses: actions/setup-go@v5
timeout-minutes: 10
with:
go-version-file: 'go.mod'
timeout-minutes: 10
# 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
Expand All @@ -30,27 +44,8 @@ jobs:
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
- 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
- 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
- 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
- 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
- name: push vm-postgres:15-alpine
run: docker push -q neondatabase/vm-postgres:15-alpine
- 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 }}
Loading