mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-01-13 16:39:29 -05:00
ci: move scheduled build into own workflow
Signed-off-by: Paul Meyer <49727155+katexochen@users.noreply.github.com>
This commit is contained in:
parent
4f9ed08061
commit
f5de2b7fc6
40
.github/workflows/build-os-image-scheduled.yml
vendored
Normal file
40
.github/workflows/build-os-image-scheduled.yml
vendored
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
name: Build and Upload OS image
|
||||||
|
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: "0 21 * * 5" # At 21:00 on Friday.
|
||||||
|
- cron: "10 21 * * 5" # At 21:10 on Friday.
|
||||||
|
- cron: "20 21 * * 5" # At 21:20 on Friday.
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
stream:
|
||||||
|
runs-on: ubuntu-22.04
|
||||||
|
outputs:
|
||||||
|
stream: ${{ steps.stream.outputs.stream }}
|
||||||
|
steps:
|
||||||
|
- name: Determine stream
|
||||||
|
id: stream
|
||||||
|
run: |
|
||||||
|
case "${{ github.event.schedule }}" in
|
||||||
|
"0 21 * * 5")
|
||||||
|
echo "stream=debug" >> "$GITHUB_OUTPUT"
|
||||||
|
;;
|
||||||
|
"10 21 * * 5")
|
||||||
|
echo "stream=console" >> "$GITHUB_OUTPUT"
|
||||||
|
;;
|
||||||
|
"20 21 * * 5")
|
||||||
|
echo "stream=nightly" >> "$GITHUB_OUTPUT"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "::error::Unknown stream for schedule '${{ github.event.schedule }}'"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
build-image:
|
||||||
|
needs: stream
|
||||||
|
uses: ./.github/workflows/build-os-image.yml
|
||||||
|
secrets: inherit
|
||||||
|
with:
|
||||||
|
stream: ${{ needs.stream.outputs.stream }}
|
||||||
|
ref: main
|
23
.github/workflows/build-os-image.yml
vendored
23
.github/workflows/build-os-image.yml
vendored
@ -1,9 +1,6 @@
|
|||||||
name: Build and Upload OS image
|
name: Build and Upload OS image
|
||||||
|
|
||||||
on:
|
on:
|
||||||
schedule:
|
|
||||||
- cron: "0 21 * * 5" # At 21:00 on Friday.
|
|
||||||
- cron: "10 21 * * 5" # At 21:10 on Friday.
|
|
||||||
- cron: "20 21 * * 5" # At 21:20 on Friday.
|
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
inputs:
|
||||||
imageVersion:
|
imageVersion:
|
||||||
@ -142,25 +139,13 @@ jobs:
|
|||||||
if [[ "${{ inputs.isRelease }}" == "true" ]] && [[ "${{ inputs.stream }}" == "nightly" ]]; then
|
if [[ "${{ inputs.isRelease }}" == "true" ]] && [[ "${{ inputs.stream }}" == "nightly" ]]; then
|
||||||
echo "Nightly builds are not allowed for releases"
|
echo "Nightly builds are not allowed for releases"
|
||||||
exit 1
|
exit 1
|
||||||
elif [[ "${{ inputs.isRelease }}" != "true" ]] && [[ "${{ inputs.stream }}" == "stable" ]]; then
|
fi
|
||||||
|
if [[ "${{ inputs.isRelease }}" != "true" ]] && [[ "${{ inputs.stream }}" == "stable" ]]; then
|
||||||
echo "Stable builds are only allowed for releases"
|
echo "Stable builds are only allowed for releases"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
case "${{ github.event.schedule }}" in
|
echo "stream=${{ inputs.stream }}" >> "$GITHUB_OUTPUT"
|
||||||
"0 21 * * 5")
|
|
||||||
echo "stream=debug" >> "$GITHUB_OUTPUT"
|
|
||||||
;;
|
|
||||||
"10 21 * * 5")
|
|
||||||
echo "stream=console" >> "$GITHUB_OUTPUT"
|
|
||||||
;;
|
|
||||||
"20 21 * * 5")
|
|
||||||
echo "stream=nightly" >> "$GITHUB_OUTPUT"
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
echo "stream=${{ inputs.stream }}" >> "$GITHUB_OUTPUT"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
- name: Determine type of image build
|
- name: Determine type of image build
|
||||||
shell: bash
|
shell: bash
|
||||||
|
Loading…
Reference in New Issue
Block a user