Initial commit
This commit is contained in:
66
README.md
Normal file
66
README.md
Normal file
@@ -0,0 +1,66 @@
|
||||
# sebse/actions
|
||||
|
||||
Reusable Gitea Actions for sebse infrastructure.
|
||||
|
||||
## Actions
|
||||
|
||||
### `docker-login`
|
||||
Login to git.sebse.de container registry.
|
||||
|
||||
**Inputs:** `username`, `password`
|
||||
|
||||
### `docker-build-push`
|
||||
Extract metadata, build and push Docker image. Handles cache automatically.
|
||||
|
||||
**Inputs:** `image`, `context`, `dockerfile` (optional)
|
||||
|
||||
### `helm-package-push`
|
||||
Inject image tag into chart values, package and push to git.sebse.de helm registry.
|
||||
Pushes both SHA-tagged and `latest` versions.
|
||||
|
||||
**Inputs:** `chart-path`, `version`, `app-version`, `username`, `password`
|
||||
|
||||
### `helm-deploy`
|
||||
Deploy via helmbot SSH to vmd127288. Validates all inputs server-side.
|
||||
|
||||
**Inputs:** `app`, `profile`, `version`, `ssh-key`
|
||||
|
||||
## Usage example
|
||||
|
||||
```yaml
|
||||
- name: Docker login
|
||||
uses: sebse/actions/docker-login@main
|
||||
with:
|
||||
username: ${{ secrets.REGISTRY_USERNAME }}
|
||||
password: ${{ secrets.REGISTRY_TOKEN }}
|
||||
|
||||
- name: Build and push app
|
||||
uses: sebse/actions/docker-build-push@main
|
||||
with:
|
||||
image: git.sebse.de/${{ github.repository }}
|
||||
context: ./web
|
||||
|
||||
- name: Package and push helm chart
|
||||
uses: sebse/actions/helm-package-push@main
|
||||
with:
|
||||
chart-path: web/charts/my-app
|
||||
version: 0.0.0-${{ env.SHORT_SHA }}
|
||||
app-version: ${{ env.SHORT_SHA }}
|
||||
username: ${{ secrets.REGISTRY_USERNAME }}
|
||||
password: ${{ secrets.REGISTRY_TOKEN }}
|
||||
|
||||
- name: Deploy to prod
|
||||
uses: sebse/actions/helm-deploy@main
|
||||
with:
|
||||
app: my-app
|
||||
profile: prod
|
||||
version: 0.0.0-${{ env.SHORT_SHA }}
|
||||
ssh-key: ${{ secrets.HELMBOT_SSH_KEY }}
|
||||
```
|
||||
|
||||
## Constants hardcoded in actions
|
||||
- Registry: `git.sebse.de`
|
||||
- Deploy host: `84.247.134.31`
|
||||
- Deploy port: `1234`
|
||||
- Deploy user: `helmbot`
|
||||
- Helm registry path: `https://git.sebse.de/api/packages/sebse/helm/api/charts`
|
||||
Reference in New Issue
Block a user