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
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
111
+
Whenever the action updates a GitOps file, it stamps the following annotations onto the manifest's `metadata.annotations`:
115
112
116
-
The environment name is derived from the mops file path (e.g. `kubernetes/namespaces/<service>/prod/de1/...` becomes `prod-de1`).
113
+
| Annotation | Value |
114
+
|------------|-------|
115
+
| `deploy.staffbase.com/repositoryFullName` | The source repository in `owner/repo` form (`$GITHUB_REPOSITORY`) |
116
+
| `deploy.staffbase.com/commitSha` | The commit SHA being deployed (`$GITHUB_SHA`) |
117
+
| `deploy.staffbase.com/version` | The deployed image tag — `dev-<short-sha>` on `dev`, `main-<short-sha>` on `main`/`master`, the tag name on tag pushes |
117
118
118
-
The calling workflow must grant the `deployments: write` permission:
These keys mirror the [Swarmia Deployment API](https://help.swarmia.com/settings/organization/configuring-deployments-in-swarmia) field names and are read by `flux-deployment-reporter` to report deployments to Swarmia once Flux finishes reconciling.
154
120
155
121
## Inputs
156
122
@@ -179,16 +145,13 @@ jobs:
179
145
| `gitops-stage` | Files which should be updated by the GitHub Action for STAGE, must be relative to the root of the GitOps repository | |
180
146
| `gitops-prod` | Files which should be updated by the GitHub Action for PROD, must be relative to the root of the GitOps repository | |
181
147
| `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`. | |
184
148
185
149
## Outputs
186
150
187
151
| Name | Description |
188
152
|-----------------|---------------------|
189
153
| `docker-digest` | Digest of the image |
190
154
| `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