feat: add GitHub Actions workflows for code quality and automation (#2)

This commit is contained in:
2025-02-02 00:42:19 +02:00
committed by GitHub
parent af6ecdf6ca
commit 210aa969b3
105 changed files with 8807 additions and 408 deletions

36
go-build/README.md Normal file
View File

@@ -0,0 +1,36 @@
# ivuorinen/actions/go-build
## Go Build
### Description
Builds the Go project.
### Inputs
| name | description | required | default |
| ------------- | ----------------------------------- | -------- | ------- |
| `go-version` | <p>Go version to use.</p> | `false` | `""` |
| `destination` | <p>Build destination directory.</p> | `false` | `./bin` |
### Runs
This action is a `composite` action.
### Usage
```yaml
- uses: ivuorinen/actions/go-build@main
with:
go-version:
# Go version to use.
#
# Required: false
# Default: ""
destination:
# Build destination directory.
#
# Required: false
# Default: ./bin
```

34
go-build/action.yml Normal file
View File

@@ -0,0 +1,34 @@
---
# yaml-language-server: $schema=https://json.schemastore.org/github-action.json
name: Go Build
description: 'Builds the Go project.'
author: 'Ismo Vuorinen'
branding:
icon: package
color: blue
inputs:
go-version:
description: 'Go version to use.'
required: false
destination:
description: 'Build destination directory.'
required: false
default: './bin'
runs:
using: composite
steps:
- name: Detect Go Version
uses: ivuorinen/actions/go-version-detect@main
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: '${{ steps.detect-go-version.outputs.go-version }}'
- name: Build Go Project
shell: bash
run: |
go build -o ${{ inputs.destination }} ./...