Skip to content

Build OpenBSD Qcow2 #13

Build OpenBSD Qcow2

Build OpenBSD Qcow2 #13

Workflow file for this run

# This is a basic workflow that is manually triggered
name: Build OpenBSD Qcow2
# Runs the action when it is triggered manually
on:
workflow_dispatch:
inputs:
release:
description: 'OpenBSD release'
default: '7.6'
required: true
type: string
jobs:
build-generic:
uses: hcartiaux/openbsd-cloud-image/.github/workflows/build.yml@main
with:
release: ${{inputs.release}}
filename: openbsd-generic.qcow2
size: 30
disklabel: custom/disklabel
sets: all
allow_root_ssh: no
build-min:
uses: hcartiaux/openbsd-cloud-image/.github/workflows/build.yml@main
with:
filename: openbsd-min.qcow2
release: ${{inputs.release}}
size: 2
disklabel: custom/disklabel.cloud
sets: -game*.tgz -x*.tgz
allow_root_ssh: no
test-generic:
needs: build-generic
uses: hcartiaux/openbsd-cloud-image/.github/workflows/test.yml@main
with:
filename: openbsd-generic.qcow2
test-min:
needs: build-min
uses: hcartiaux/openbsd-cloud-image/.github/workflows/test.yml@main
with:
filename: openbsd-min.qcow2
release:
needs: [test-generic,test-min]
runs-on: ubuntu-latest
permissions: write-all
environment:
name: release
steps:
- name: Check out the repository to the runner
uses: actions/checkout@v4
- name: Generate tag name
run: echo "tag=v${{ github.event.inputs.release }}_$(date +'%Y-%m-%d-%H-%M')" >> "$GITHUB_ENV"
- uses: actions/download-artifact@v4
with:
name: openbsd-generic.qcow2
path: images
- uses: actions/download-artifact@v4
with:
name: openbsd-generic.qcow2.sha256
path: images
- name: Verify the checksum of openbsd-generic.qcow2
run: |
sha256sum -c images/openbsd-generic.qcow2.sha256
- uses: actions/download-artifact@v4
with:
name: openbsd-min.qcow2
path: images
- uses: actions/download-artifact@v4
with:
name: openbsd-min.qcow2.sha256
path: images
- name: Verify the checksum of openbsd-min.qcow2
run: |
sha256sum -c images/openbsd-min.qcow2.sha256
- name: Create a new release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release create "${tag}" \
--repo="$GITHUB_REPOSITORY" \
--title="OpenBSD Cloud Image ${tag}" \
--generate-notes
- name: Upload the Qcow2 and checksum files
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release upload "${tag}" images/openbsd-generic.qcow2
gh release upload "${tag}" images/openbsd-generic.qcow2.sha256
gh release upload "${tag}" images/openbsd-min.qcow2
gh release upload "${tag}" images/openbsd-min.qcow2.sha256