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
This template can be used to quickly start a new custom js action repository. Click the `Use this template` button at the top to get started.
3
+
This action gets a list of GitHub deployments and statuses created by [im-open/create-github-deployment]. It is designed to work with a custom Spotify Backstage GitHub Deployments plugin called [im-open/im-github-deployments].
|`token`| true | A token with `deployments:read` and `contents:read` to get the deployments and release reference data. |
25
+
|`environment`| true | The name of a GitHub environment the release was deployed to, i.e. [Dev\|QA\|Stage\|Demo\|UAT\|Prod]. It will be used to filter deployment objects. |
26
+
|`entity`| true | The entity that is deployed, i.e. "proj-app", "proj-infrastruction" or "proj-db" |
27
+
|`instance`| true | A freeform identifier to distinguish separately deployed instances of the entity in the same environment. Typical uses would be to name a slot and/or region, e.g "NA26", "NA26-slot1", "NA27-blue", "Primary", "Secondary", etc. |
uses: im-open/thisrepo@v1.0.0 # TODO: fix the action name
93
-
with:
94
-
input: ''
88
+
*_Make sure your workflow has the `permissions.contents` and `permissions.deployments` set to `read`._*
89
+
90
+
### Return Example
91
+
92
+
```json
93
+
[
94
+
{
95
+
"ref": "v1.2.1",
96
+
"status": "SUCCESS",
97
+
"description": "It worked!",
98
+
"workflow_actor": "gh-user",
99
+
"created_at": "2024-01-31T17:21:08.000+00:00"
100
+
},
101
+
{
102
+
"ref": "v1.2.3",
103
+
"status": "INACTIVE",
104
+
"description": "Inactivated by workflow",
105
+
"workflow_actor": "gh-user",
106
+
"created_at": "2024-01-31T17:21:08.000+00:00"
107
+
},
108
+
{
109
+
"ref": "v1.2.2",
110
+
"status": "INACTIVE",
111
+
"description": "Inactivated by workflow",
112
+
"workflow_actor": "gh-user",
113
+
"created_at": "2024-01-30T23:26:19.000+00:00"
114
+
},
115
+
...
116
+
]
95
117
```
96
118
97
119
## Contributing
@@ -102,14 +124,13 @@ When creating PRs, please review the following guidelines:
102
124
-[ ] At least one of the commit messages contains the appropriate `+semver:` keywords listed under [Incrementing the Version] for major and minor increments.
103
125
-[ ] The action has been recompiled. See [Recompiling Manually] for details.
104
126
-[ ] The README.md has been updated with the latest version of the action. See [Updating the README.md] for details.
105
-
- [ ] Any tests in the [build-and-review-pr] workflow are passing
106
127
107
128
### Incrementing the Version
108
129
109
130
This repo uses [git-version-lite] in its workflows to examine commit messages to determine whether to perform a major, minor or patch increment on merge if [source code] changes have been made. The following table provides the fragment that should be included in a commit message to active different increment strategies.
@@ -118,7 +139,7 @@ This repo uses [git-version-lite] in its workflows to examine commit messages to
118
139
119
140
### Source Code Changes
120
141
121
-
The files and directories that are considered source code are listed in the `files-with-code` and `dirs-with-code` arguments in both the [build-and-review-pr] and [increment-version-on-merge] workflows.
142
+
The files and directories that are considered source code are listed in the `files-with-code` and `dirs-with-code` arguments in both the [build-and-review-pr] and [increment-version-on-merge] workflows.
122
143
123
144
If a PR contains source code changes, the README.md should be updated with the latest action version and the action should be recompiled. The [build-and-review-pr] workflow will ensure these steps are performed when they are required. The workflow will provide instructions for completing these steps if the PR Author does not initially complete them.
124
145
@@ -137,25 +158,28 @@ npm run build
137
158
138
159
If changes are made to the action's [source code], the [usage examples] section of this file should be updated with the next version of the action. Each instance of this action should be updated. This helps users know what the latest tag is without having to navigate to the Tags page of the repository. See [Incrementing the Version] for details on how to determine what the next version will be or consult the first workflow run for the PR which will also calculate the next version.
139
160
140
-
### Tests
141
-
142
-
The build and review PR workflow includes tests which are linked to a status check. That status check needs to succeed before a PR is merged to the default branch. When a PR comes from a branch, there should not be any issues running the tests. When a PR comes from a fork, tests may not have the required permissions or access to run since the `GITHUB_TOKEN` only has `read` access set for all scopes. Also, forks cannot access other secrets in the repository. In these scenarios, a fork may need to be merged into an intermediate branch by the repository owners to ensure the tests run successfully prior to merging to the default branch.
143
-
144
161
## Code of Conduct
145
162
146
163
This project has adopted the [im-open's Code of Conduct](https://github.com/im-open/.github/blob/main/CODE_OF_CONDUCT.md).
description: Get GitHub a list of deployments that have been created by im-open/create-github-deployment.
4
3
5
4
inputs:
6
-
input-1:
7
-
description: 'Add a description here'
5
+
token:
6
+
description: A token with `deployments:read` and `contents:read` to get the deployments and release reference data.
7
+
required: true
8
+
environment:
9
+
description: The name of a GitHub environment the release was deployed to, i.e. [Dev\|QA\|Stage\|Demo\|UAT\|Prod]. It will be used to filter deployment objects.
10
+
required: true
11
+
entity:
12
+
description: The entity that is deployed, i.e. "proj-app", "proj-infrastruction" or "proj-db"
13
+
required: true
14
+
instance:
15
+
description: A freeform identifier to distinguish separately deployed instances of the entity in the same environment. Typical uses would be to name a slot and/or region, e.g "NA26", "NA26-slot1", "NA27-blue", "Primary", "Secondary", etc.
0 commit comments