mirror of
https://github.com/kairos-io/ipxe-dhcp.git
synced 2025-04-27 10:40:50 +00:00
🤖 Add CI pipelines
Signed-off-by: mudler <mudler@mocaccino.org>
This commit is contained in:
parent
be14d943bf
commit
17346e3e7e
35
.github/workflows/image.yaml
vendored
Normal file
35
.github/workflows/image.yaml
vendored
Normal file
@ -0,0 +1,35 @@
|
||||
name: Build image
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
|
||||
concurrency:
|
||||
group: ci-image-${{ github.head_ref || github.ref }}-${{ github.repository }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
id-token: write # OIDC support
|
||||
strategy:
|
||||
fail-fast: false
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- run: |
|
||||
git fetch --prune --unshallow
|
||||
- name: setup-docker
|
||||
uses: docker-practice/actions-setup-docker@master
|
||||
- name: Build 🔧
|
||||
run: |
|
||||
./earthly.sh +iso
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: ipxe-artifacts.zip
|
||||
path: |
|
||||
build/*
|
||||
if-no-files-found: error
|
||||
|
29
.github/workflows/release.yaml
vendored
Normal file
29
.github/workflows/release.yaml
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
name: Release
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- v*
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
id-token: write # OIDC support
|
||||
contents: write
|
||||
strategy:
|
||||
fail-fast: false
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- run: |
|
||||
git fetch --prune --unshallow
|
||||
- name: setup-docker
|
||||
uses: docker-practice/actions-setup-docker@master
|
||||
- name: Build 🔧
|
||||
run: |
|
||||
./earthly.sh +iso
|
||||
- name: Release
|
||||
uses: softprops/action-gh-release@v1
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
with:
|
||||
files: |
|
||||
build/*
|
@ -20,7 +20,7 @@ iso:
|
||||
mtools syslinux isolinux gcc-arm-none-eabi git make gcc liblzma-dev mkisofs xorriso
|
||||
# jq docker
|
||||
WORKDIR /build
|
||||
ARG ISO_NAME=${OS_ID}
|
||||
ARG ISO_NAME=ipxe-dhcp
|
||||
COPY +version/VERSION ./
|
||||
ARG VERSION=$(cat VERSION)
|
||||
|
||||
|
3
earthly.sh
Executable file
3
earthly.sh
Executable file
@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
docker run --privileged -v /var/run/docker.sock:/var/run/docker.sock --rm -t -v $(pwd):/workspace -v earthly-tmp:/tmp/earthly:rw earthly/earthly:v0.6.21 --allow-privileged $@
|
Loading…
Reference in New Issue
Block a user