Skip to content

Commit 7d363f3

Browse files
committed
chore: adding docs for gitops release
1 parent 18103e8 commit 7d363f3

1 file changed

Lines changed: 44 additions & 0 deletions

File tree

README.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,3 +115,47 @@ build:
115115
build_secrets: |
116116
MY_SECRET=${{ secrets.MY_SECRET }}
117117
```
118+
119+
---
120+
121+
### `gitops-deploy.yml` — GitOps Deploy
122+
123+
Updates an image tag in a GitOps repository (e.g. an ArgoCD application YAML) and commits the change. Matches the tag line using a [Renovate](https://docs.renovatebot.com/) `datasource=docker depName=` annotation comment. Supports GitHub App auth or a PAT.
124+
125+
#### Secrets
126+
127+
| Name | Description |
128+
|------|-------------|
129+
| `APP_ID` | GitHub App client ID (use with `APP_PRIVATE_KEY`) |
130+
| `APP_PRIVATE_KEY` | GitHub App private key |
131+
| `RELEASE_TOKEN` | PAT alternative to App auth |
132+
133+
Either `RELEASE_TOKEN` or both App secrets must be set. The app or PAT must have write access to the gitops repository.
134+
135+
#### Inputs
136+
137+
| Name | Required | Default | Description |
138+
|------|----------|---------|-------------|
139+
| `version` | yes | — | Version tag to deploy |
140+
| `repository` | yes | — | GitOps repository to update (e.g. `org/repo`) |
141+
| `file` | yes | — | Path to the application YAML file within the repository |
142+
| `package` | yes | — | Full image name matching the `depName=` annotation (e.g. `ghcr.io/myorg/myimage`) |
143+
| `ref` | no | `'main'` | Branch to checkout and push to |
144+
| `runner` | no | `'self-hosted'` | Runner label for the deploy job |
145+
146+
#### Example
147+
148+
```yaml
149+
deploy:
150+
if: needs.prepare.outputs.is_release == 'true'
151+
needs: [prepare, build]
152+
uses: mogenius/github-actions/.github/workflows/gitops-deploy.yml@<sha> # main
153+
secrets:
154+
APP_ID: ${{ secrets.GITOPS_APP_ID }}
155+
APP_PRIVATE_KEY: ${{ secrets.GITOPS_APP_PRIVATE_KEY }}
156+
with:
157+
version: ${{ needs.prepare.outputs.version }}
158+
repository: myorg/my-argocd-applications
159+
file: dev/my-service/application.yaml
160+
package: ghcr.io/myorg/my-service
161+
```

0 commit comments

Comments
 (0)