GitHub Action to setup common Homelab requirements like an SSH-Agent w/ SSH Certificate based auth & trust for self-signed CA Certs.
|
|
||
|---|---|---|
| .forgejo/workflows | ||
| LICENSES | ||
| .gitignore | ||
| .renovaterc.json5 | ||
| .version | ||
| .version.license | ||
| .versionrc | ||
| .versionrc.license | ||
| action.yml | ||
| Makefile | ||
| README.md | ||
action-common-setup
A little composite action to consistently setup GitHub Actions across my homelab runner environments.
- If the
ssh-agentbin exists- Starts a fresh
ssh-agent - Sets the env vars for future steps
- Starts a fresh
- Installs the
stepbinary for step-ca commands - Bootstraps the environment for the Homelab SPM CA Trust
- Tries to update any CA certs for the system that were missed.
- Configures
gitcommands forhttps://git.auengun.netto use the Root CA for trust.
- If
JWK_PASSWORDis defined:- Attempts to provision a ssh user certificate for the
${{ github.actor }}(username of the user that triggered the initial workflow run) for clone/inter-node actions. - Runs
step ssh configto update known hosts and other params for easiersshcommands.
- Attempts to provision a ssh user certificate for the
- Clones the repo's code into the
/workspaceusing https://code.forgejo.org/actions/checkout
Example
name: Terraform - Apply
on:
pull_request:
types: [labeled]
jobs:
apply-on-label:
name: Apply on Label
if: contains(github.event.pull_request.labels.*.name, 'terraform/apply')
runs-on: ubuntu-latest
steps:
- name: Homelab Setup
uses: https://git.auengun.net/homelab/action-common-setup@main
with:
STEP_CA_JWK_PASSWORD: ${{ secrets.STEP_CA_JWK_PASSWORD }}