Skip to content

Commit

Permalink
github: specify buildmode via environment
Browse files Browse the repository at this point in the history
  • Loading branch information
maxux committed Sep 6, 2024
1 parent 83ea9a0 commit 5746f50
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/kernel.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,24 @@ on:
paths-ignore:
- README.md

# define global buildmode variable used by initramfs
# and by tf-build-upload script to specify if we trigger
# a 'debug' or 'release' (production) image
#
# mode release:
# set by default here, theses images are the most
# secure and are production ready, does not ship debugging
# tools and have hardened security
#
# mode debug:
# only set if branch name starts with 'debug-' prefix, theses
# images contains easy remote access and extra debugging tools
#
# -- DEBUG IMAGE SHOULD NEVER BE USED IN A PRODUCTION --
#
env:
BUILDMODE: release

jobs:
kernel:
name: "Zero-OS Kernel Image"
Expand All @@ -22,6 +40,10 @@ jobs:
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
id: runbranch

- name: Update buildmode for debugging image
if: ${{ contains(github.ref, '-zos-v4-debug-'') }}
run: echo "BUILDMODE=debug" >> $GITHUB_ENV

- name: "Install: go"
uses: actions/setup-go@v1
with:
Expand Down

0 comments on commit 5746f50

Please sign in to comment.