Update workflow to verify fmt

To support this, I refactored the actions to use a composite action so
that all checks could run with the same setup.

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
This commit is contained in:
Jonathon Anderson
2023-10-24 16:10:37 -06:00
parent 42842aeee1
commit 9c3894f24e
4 changed files with 113 additions and 83 deletions

26
.github/actions/prepare/action.yml vendored Normal file
View File

@@ -0,0 +1,26 @@
name: 'Prepare Warewulf'
description: 'Prepare environment and Warewulf source code for testing and building'
inputs:
go-version:
required: true
runs:
using: "composite"
steps:
- name: Install gpgme (dependency)
run: sudo apt-get install libgpgme-dev
shell: bash
- name: Setup go ${{ inputs.go-version }}
uses: actions/setup-go@v3
with:
go-version: ${{ inputs.go-version }}
cache: true
- name: Configure Warewulf
run: make config
shell: bash
- name: Prepare vendor directory
run: make vendor
shell: bash