feat: commit runner

This commit is contained in:
Martin Hnatek 2024-07-28 08:30:57 +02:00
parent 258efc68f2
commit 7f641f910e
2 changed files with 57 additions and 0 deletions

23
.github/osx_build.yaml vendored Normal file
View File

@ -0,0 +1,23 @@
name: osx_build
on: [push]
#matrix:
# OSX_VERSION:
# - sonoma
# - ventura
# - monterey
jobs:
build_image:
runs-on: osx
steps:
- name: Checkout
uses: actions/checkout@v4
- run: |
export
cd ${{ github.repository }}/osx
packer init .
packer build var macos_version=${OSX_VERSION} .
tart push ${OSX_VERSION}base gitea.hnatekmar.xyz/osx:${OSX_VERSION}latest chunksize 8
tart prune spacebudget 25

34
osx/base.pkr.hcl Normal file
View File

@ -0,0 +1,34 @@
packer {
required_plugins {
tart = {
version = ">= 1.11.1"
source = "github.com/cirruslabs/tart"
}
}
}
variable "macos_version" {
type = string
default = "ventura"
}
source "tart-cli" "tart" {
vm_base_name = "ghcr.io/cirruslabs/macos-${var.macos_version}-base:latest"
vm_name = "${var.macos_version}-base"
cpu_count = 4
memory_gb = 4
disk_size_gb = 50
ssh_username = "admin"
ssh_password = "admin"
ssh_timeout = "120s"
}
build {
sources = ["source.tart-cli.tart"]
provisioner "shell" {
inline = ["mkdir .ssh && echo ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIF+vlPAhg+TbppzQhqJ7joeQYU81EphWvyYswBH0oj21 martin@Martins-Mac-mini.local > .ssh/authorized_keys"]
}
# more provisioners
}