https://github.com/a-b/gha-shepherd
https://github.com/a-b/gha-shepherd
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/a-b/gha-shepherd
- Owner: a-b
- Created: 2024-06-03T19:16:04.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-06-13T19:36:56.000Z (about 2 years ago)
- Last Synced: 2025-11-12T13:23:44.193Z (8 months ago)
- Language: Shell
- Size: 16.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# GitHub Action for managing shepherd leases
[](https://github.com/a-b/gha-shepherd/actions/workflows/test.yml)
## Usage
This action abstracts claiming and unclaiming shepherd leases.
[.github/workflows/test.yml](.github/workflows/test.yml) provides a good starting point.
## Development
1. Open with VisualStudion Code
- Check if [Dev Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) extension is installed.
1. Create [.secrets](.secrets) file with real API token.
- `echo "API_TOKEN: $(shepherd create service-account gha-shepherd --json | jq -r .secret)" >> .secrets`
- Local workflow dev runner [act](https://github.com/nektos/act) injects content of [.env](.env) and [.secrets](.secrets) into workflow execution context.
1. Open project inside the dev container.
1. Run `make run` to start.
## Deployment
1. To upload variables and secrets to the default remote repo for the current branch. **PROCEED WITH CARE** use `make repo-context-setup`. This will overwrite remote vaules with local from [.env](.env) and [.secrets](.secrets)
## ADR
1. Parameter validation happens inside shell script, inputs in [./action.yml] are maximum permissive.