Skip to content

Commit

Permalink
ci: add multi version build in release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
donch committed Aug 28, 2023
1 parent 8774563 commit b0b0027
Showing 1 changed file with 44 additions and 11 deletions.
55 changes: 44 additions & 11 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
name: Build and release Systemd sysext images
on:
push:
tags:
- '*'
workflow_dispatch:
jobs:
build:
name: Build
runs-on: ubuntu-22.04
permissions:
# allow the action to create a release
Expand All @@ -13,16 +12,10 @@ jobs:
# checkout the sources
- uses: actions/checkout@v3
# build the images and generate a manifest
- name: build
- name: Build
run: |
set -euo pipefail
sudo apt update -qq && sudo apt install -yqq \
curl \
jq \
squashfs-tools \
xz-utils
images=(
"teleport-9.3.26"
"teleport-10.3.16"
Expand All @@ -38,7 +31,47 @@ jobs:
sha256sum *.raw > SHA256SUMS
# create a Github release with the generated artifacts
- name: release
- name: Release
uses: softprops/action-gh-release@v1
with:
files: |
SHA256SUMS
*.raw
multi-build:
name: Multi version build
runs-on: ubuntu-22.04
container: mediadepot/flatcar-developer:${{ matrix.flatcarversion }}
strategy:
max-parallel: 6
matrix:
flatcarversion: ["3510.2.6"]
permissions:
# allow the action to create a release
contents: write
steps:
# checkout the sources
- uses: actions/checkout@v3
# build the images and generate a manifest
- name: Build
run: |
set -euo pipefail
images=(
"zfs-2.1.11-${{ matrix.flatcarversion }}"
)
for image in ${images[@]}; do
component="${image%%-*}"
flatcarversion="${image##*-}"
temp="${image#*-}"
version="${temp%-*}"
"./create_${component}_sysext.sh" "${version}" "${component}" "${flatcarversion}"
mv "${component}.raw" "${image}.raw"
done
sha256sum *.raw > SHA256SUMS
# create a Github release with the generated artifacts
- name: Release
uses: softprops/action-gh-release@v1
with:
files: |
Expand Down

0 comments on commit b0b0027

Please sign in to comment.