Skip to content

Commit

Permalink
Merge branch 'release/centos-0.1.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
zacksiri committed Mar 13, 2024
2 parents 27523c0 + da6ab17 commit 6450bdc
Show file tree
Hide file tree
Showing 2 changed files with 1,015 additions and 0 deletions.
63 changes: 63 additions & 0 deletions .github/workflows/centos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: 'CentOS'

on:
push:
tags:
- centos-*.*.*

jobs:
build:
strategy:
fail-fast: false
matrix:
release: [
{distro: "centos", version: "8-Stream", source: "https://mirror.math.princeton.edu/pub/centos/"},
{distro: "centos", version: "9-Stream", source: "https://mirror1.hs-esslingen.de/pub/Mirrors/centos-stream"}
]
os: [
{arch: "aarch64", builder: "ubicloud-standard-2-arm", types: ["container"]},
{arch: "x86_64", builder: "warp-ubuntu-latest-x64-2x", types: ["vm", "container"]}
]

runs-on: ${{matrix.os.builder}}
env:
ImageOS: ubuntu22
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup IcePAK
uses: upmaru/[email protected]
with:
alpine: v3.19
arch: ${{matrix.os.arch}}

- name: Generate Serial
id: generate-serial
run: |
echo "serial=$(date +'%Y%m%d')-$GITHUB_RUN_NUMBER" >> $GITHUB_OUTPUT
- name: Build Container Image
if: ${{ !contains(matrix.os.types, 'vm') }}
run: |
sudo apt-get install debootstrap btrfs-progs dosfstools qemu-utils gdisk -y
sudo ~/go/bin/distrobuilder build-dir images/${{matrix.release.distro}}.yml rootfs -o image.serial=${{ steps.generate-serial.outputs.serial }} -o image.architecture=${{matrix.os.arch}} -o image.release=${{matrix.release.version}} -o source.variant=boot -o source.url=${{matrix.release.source}}
sudo ~/go/bin/distrobuilder pack-incus images/${{matrix.release.distro}}.yml rootfs -o image.serial=${{ steps.generate-serial.outputs.serial }} -o image.architecture=${{matrix.os.arch}} -o image.release=${{matrix.release.version}} -o source.variant=boot -o source.url=${{matrix.release.source}}
- name: Build Container and VM Image
if: ${{ contains(matrix.os.types, 'vm') }}
run: |
sudo apt-get install debootstrap btrfs-progs dosfstools qemu-utils gdisk -y
sudo ~/go/bin/distrobuilder build-dir images/${{matrix.release.distro}}.yml rootfs -o image.serial=${{ steps.generate-serial.outputs.serial }} -o image.architecture=${{matrix.os.arch}} -o image.release=${{matrix.release.version}} -o source.variant=boot -o source.url=${{matrix.release.source}}
sudo ~/go/bin/distrobuilder pack-incus images/${{matrix.release.distro}}.yml rootfs -o image.serial=${{ steps.generate-serial.outputs.serial }} -o image.architecture=${{matrix.os.arch}} -o image.release=${{matrix.release.version}} -o source.variant=boot -o source.url=${{matrix.release.source}}
sudo ~/go/bin/distrobuilder pack-incus images/${{matrix.release.distro}}.yml rootfs --vm -o image.serial=${{ steps.generate-serial.outputs.serial }} -o image.architecture=${{matrix.os.arch}} -o image.release=${{matrix.release.version}} -o source.variant=boot -o source.url=${{matrix.release.source}}
- name: Push
run: |
icepak push --serial ${{ steps.generate-serial.outputs.serial }} --os ${{matrix.release.distro}} --arch ${{matrix.os.arch}} --release ${{matrix.release.version}} --variant default
shell: alpine.sh {0}
env:
POLAR_AUTH_TOKEN: ${{ secrets.POLAR_AUTH_TOKEN }}
POLAR_ENDPOINT: ${{ vars.POLAR_ENDPOINT }}
Loading

0 comments on commit 6450bdc

Please sign in to comment.