Refactor GitHub workflows

This mostly simplifies our GitHub actions, but also fixes recent
breaking in the release workflows, unifies the tagged and nightly
release workflows, and moves to using `gh release` to manage releases.

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
This commit is contained in:
Jonathon Anderson
2025-07-07 17:32:02 -06:00
parent f22ab9e7b1
commit 0cb9354364
10 changed files with 227 additions and 572 deletions

51
.github/workflows/testsuite.yml vendored Normal file
View File

@@ -0,0 +1,51 @@
---
name: testsuite
on:
pull_request:
branches:
- main
- 'v4.*.x'
paths-ignore:
- 'docs/**'
jobs:
testsuite:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: ['1.22', '1.23']
steps:
- name: Checkout Warewulf
uses: actions/checkout@v4
- name: Install gpgme (dependency)
run: |
sudo apt update \
&& sudo apt-get install libgpgme-dev
shell: bash
- name: Setup go ${{ matrix.go-version }}
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
cache: true
- name: Prepare Warewulf
shell: bash
run: |
make config
make vendor
- name: Check for out-of-date license information
run: make LICENSE_DEPENDENCIES.md && git diff --quiet LICENSE_DEPENDENCIES.md
- name: Check Warewulf code with golang linter (golang ${{ matrix.go-version }})
run: make lint
- name: Check Warewulf code with staticcheck (golang ${{ matrix.go-version }})
run: make staticcheck
- name: Vet Warewulf code (golang ${{ matrix.go-version }})
run: make vet
- name: Check Warewulf code for formatting (golang ${{ matrix.go-version }})
run: test "$(make -s fmt | wc -l)" == 0
- name: Check for dead Warewulf code (golang ${{ matrix.go-version }})
run: make deadcode
- name: Run the test suite (golang ${{ matrix.go-version }})
run: make test
- name: Build Warewulf (golang ${{ matrix.go-version }})
run: make all