Skip to content

Commit

Permalink
Add GitHub CI/CD configuration
Browse files Browse the repository at this point in the history
This will test builds of both DEV and PROD images, and, if pushing to a
tag, it will release artifacts.
  • Loading branch information
JJL772 committed Nov 22, 2024
1 parent f0f1386 commit d537dd8
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 1 deletion.
32 changes: 32 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Build + Release

on:
push:

jobs:
build-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Generate DEV image
run: ./generate.sh

- name: Generate PROD image
run: ./generate.sh --prod

- name: Get Version
id: version
run: echo "version=$(cat VERSION)" >> "$GITHUB_OUTPUT"

# Create a new draft release if we're pushing to a tag
- name: Create Release
uses: softprops/action-gh-release@v2
# Only run this when we push to a tag
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
output/*.gz
output/vmlinuz*
draft: true

2 changes: 1 addition & 1 deletion generate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
cd docker && ./build.sh && cd -

# Use the docker image to build the CentOS7 diskless images
docker container run -ti --rm \
docker container run -i --rm \
--ulimit "nofile=1024:1024" \
--mount src=${PWD}/output,target=/output,type=bind \
--mount src=centos7-builder,target=/centos7-builder,type=volume \
Expand Down

0 comments on commit d537dd8

Please sign in to comment.