Build and release Systemd sysext images #16
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and release Systemd sysext images | |
on: | |
workflow_dispatch: | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-22.04 | |
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=( | |
"teleport-9.3.26" | |
"teleport-10.3.16" | |
"teleport-11.3.22" | |
) | |
for image in ${images[@]}; do | |
component="${image%-*}" | |
version="${image#*-}" | |
"./create_${component}_sysext.sh" "${version}" "${component}" | |
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: | | |
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: | | |
SHA256SUMS | |
*.raw |