64 lines
1.3 KiB
Markdown
64 lines
1.3 KiB
Markdown
## Actions
|
|
|
|
This repo provides reusable Gitea Actions as composite actions that can be referenced with `uses:`.
|
|
|
|
### Bump Version
|
|
|
|
Example:
|
|
|
|
```yaml
|
|
jobs:
|
|
bump-version:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: write
|
|
steps:
|
|
- uses: tanztee/ci-cd/.github/actions/bump-version@main
|
|
with:
|
|
gitea_token: ${{ secrets.GITEA_TOKEN }}
|
|
```
|
|
|
|
### Build and Push Docker Image
|
|
|
|
Example:
|
|
|
|
```yaml
|
|
jobs:
|
|
build-and-push:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
packages: write
|
|
steps:
|
|
- uses: tanztee/ci-cd/.github/actions/build-and-push@main
|
|
with:
|
|
registry: ${{ secrets.REGISTRY }}
|
|
registry_username: ${{ secrets.REGISTRY_USERNAME }}
|
|
registry_password: ${{ secrets.REGISTRY_PASSWORD }}
|
|
```
|
|
|
|
### Deploy Image to Kubernetes
|
|
|
|
Example:
|
|
|
|
```yaml
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
tag:
|
|
description: Image tag to deploy (e.g. v1.2.3)
|
|
required: true
|
|
type: string
|
|
|
|
jobs:
|
|
deploy:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: tanztee/ci-cd/.github/actions/deploy-k8s@main
|
|
with:
|
|
tag: ${{ inputs.tag }}
|
|
namespace: oumta-dev
|
|
kubeconfig: ${{ secrets.KUBECONFIG }}
|
|
registry: ${{ secrets.REGISTRY }}
|
|
```
|