You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: add create-deployment input for GitHub Deployment tracking
Add opt-in `create-deployment` boolean input that creates GitHub
Deployments on the source repository and writes tracking annotations
to the Application CR in the mops overlay. This enables the
flux-deployment-reporter to identify and update deployment status
without image-to-repo mapping or tag parsing.
New inputs: `create-deployment`, `github-token`
New output: `deployment-id` (JSON map of environment to deployment ID)
Closes CI-1201
Co-Authored-By: Claude <claude@anthropic.com>
When `create-deployment` is set to `true`, the action will:
112
+
1. Create a GitHub Deployment on the source repository for each target environment
113
+
2. Set the deployment status to `in_progress`
114
+
3. Write deployment tracking annotations (`deploy.staffbase.com/repo`, `deploy.staffbase.com/sha`, `deploy.staffbase.com/deployment-id`) to the Application CR in the mops overlay
115
+
116
+
The environment name is derived from the mops file path (e.g. `kubernetes/namespaces/<service>/prod/de1/...` becomes `prod-de1`).
117
+
118
+
The calling workflow must grant the `deployments: write` permission:
| `gitops-stage` | Files which should be updated by the GitHub Action for STAGE, must be relative to the root of the GitOps repository | |
134
180
| `gitops-prod` | Files which should be updated by the GitHub Action for PROD, must be relative to the root of the GitOps repository | |
135
181
| `working-directory` | The directory in which the GitOps action should be executed. The docker-file variable should be relative to working directory. | `.` |
182
+
| `create-deployment` | Create GitHub Deployments on the source repository and write tracking annotations to the GitOps CRs | `false` |
183
+
| `github-token` | GitHub Token for creating deployments (requires `deployments: write` permission). Required when `create-deployment` is `true`. | |
136
184
137
185
## Outputs
138
186
139
187
| Name | Description |
140
188
|-----------------|---------------------|
141
-
| `docker-digest` | Digest of the image |
142
-
| `docker-tag` | Tag of the image |
189
+
| `docker-digest` | Digest of the image |
190
+
| `docker-tag` | Tag of the image |
191
+
| `deployment-id` | JSON map of environment to GitHub Deployment ID (set when `create-deployment` is `true`) |
0 commit comments