-
Notifications
You must be signed in to change notification settings - Fork 21
50 lines (44 loc) · 1.68 KB
/
vm-kernel.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
name: vm-kernel
on:
schedule:
- cron: '42 4 * * 2' # run once a week
workflow_dispatch: # adds ability to run this manually
inputs:
push:
description: 'Push to Docker Hub'
type: boolean
default: false
tag:
description: 'Tag to use for Docker image'
required: false
env:
VM_KERNEL_IMAGE: "neondatabase/vm-kernel-test"
VM_KERNEL_VERSION: "5.15.80"
jobs:
vm-kernel:
runs-on: ubuntu-latest
steps:
- name: git checkout
uses: actions/checkout@v3
- name: docker - install qemu
uses: docker/setup-qemu-action@v2
- name: docker - setup buildx
uses: docker/setup-buildx-action@v2
- name: login to docker hub
uses: docker/login-action@v2
with:
username: ${{ secrets.NEON_DOCKERHUB_USERNAME }}
password: ${{ secrets.NEON_DOCKERHUB_PASSWORD }}
- name: build linux kernel
uses: docker/build-push-action@v3
with:
build-args: KERNEL_VERSION=${{ env.VM_KERNEL_VERSION }}
context: neonvm/hack
platforms: linux/amd64
# Push only if this is a scheduled run or if the workflow_dispatch input push is set to true
push: ${{ github.event_name == 'schedule' && 'true' || ( github.event_name == 'workflow_dispatch' && inputs.push || 'false') }}
pull: true
no-cache: true
file: neonvm/hack/Dockerfile.kernel-builder
# Tag the image with the tag from the workflow_dispatch input or the VM_KERNEL_VERSION env var
tags: ${{ env.VM_KERNEL_IMAGE }}:${{ (github.event_name == 'workflow_dispatch' && inputs.tag != '') && inputs.tag || env.VM_KERNEL_VERSION }}