vm-kernel #70
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-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" | |
VM_KERNEL_VERSION: "6.5.11" | |
jobs: | |
vm-kernel: | |
# Use the biggest GitHub Hosted runner | |
runs-on: gha-ubuntu-22.04-64cores | |
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 }} |