Compare commits

...

3 commits

Author SHA1 Message Date
014ce605da
ci: run pre-commit hook on ci
All checks were successful
Push / static-analysis (push) Successful in 53s
2024-11-08 21:51:13 -05:00
d3fa0dcb96
build: add pre-commit checks for yaml + shellscript 2024-11-08 21:50:55 -05:00
1ac5adb151 feat: ensure spud correctly installed and placed on PATH
Reviewed-on: #1
Co-authored-by: Marc Cataford <mcat@riseup.net>
Co-committed-by: Marc Cataford <mcat@riseup.net>
2024-11-09 02:48:46 +00:00
5 changed files with 41 additions and 1 deletions

View file

@ -0,0 +1,12 @@
name: Push
on: [push]
jobs:
static-analysis:
runs-on: runner-latest
steps:
- uses: actions/checkout@v4
- name: Validate Yaml
run: pipx run pre-commit run check-yaml -a
- name: Validate shell scripts
run: pipx run pre-commit run shellcheck -a

10
.pre-commit-config.yaml Normal file
View file

@ -0,0 +1,10 @@
---
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: check-yaml
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.10.0.1
hooks:
- id: shellcheck

11
README.md Normal file
View file

@ -0,0 +1,11 @@
# Setup Spud Action
## Interface
```yaml
inputs:
version:
description: "Spud version to install."
```
If the `version` input is not provided, the latest version will be installed (see [spadinastan/spud](https://forge.karnov.club/spadinastan/spud)).

View file

@ -1,10 +1,14 @@
name: Setup Spud
name: Setup Spud Tooling
inputs:
version:
description: "Spud version to install."
runs:
using: composite
steps:
- name: Ensure install directory exists and is on PATH
run: |
mkdir -p $HOME/.local/bin
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Pull pre-built binary
env:
SPUD_VERSION: ${{ inputs.version }}

3
bootstrap.sh Executable file
View file

@ -0,0 +1,3 @@
#!/bin/bash
pipx run pre-commit install