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
Copy file name to clipboardExpand all lines: README.md
+94-97Lines changed: 94 additions & 97 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,75 +5,73 @@ Instead of exposing convoluted Action configuration that mirrors that of the [Gi
5
5
6
6
> 📢 This project is in need of additional maintainers - if you are interested in helping out please [let me know](https://github.com/bobheadxi/deployments/discussions/103)!
You can also refer to other projects that also use this action - you can find [more usages of this action on Sourcegraph](https://sourcegraph.com/search?q=context:global+uses:+bobheadxi/deployments%40.*+file:%5E%5C.github/workflows+-repo:bobheadxi+count:all&patternType=regexp), or check out the following examples:
- [`mxcl/PromiseKit`](https://sourcegraph.com/search?q=context:global+repo:%5Egithub%5C.com/mxcl/PromiseKit%24+file:%5E%5C.github/workflows+bobheadxi/deployments&patternType=literal) [](https://github.com/mxcl/PromiseKit) - promises for Swift and Objective-C
- [`skylines-project/skylines`](https://sourcegraph.com/search?q=repo:%5Egithub%5C.com/skylines-project/skylines%24+bobheadxi/deployments&patternType=literal) [](https://github.com/skylines-project/skylines) - live tracking, flight database and competition web platform
56
+
- [`skylines-project/skylines`](https://sourcegraph.com/search?q=repo:%5Egithub%5C.com/skylines-project/skylines%24+bobheadxi/deployments\&patternType=literal) [](https://github.com/skylines-project/skylines) - live tracking, flight database and competition web platform
59
57
60
58
Also feel free to chime in on the [show and tell discussion](https://github.com/bobheadxi/deployments/discussions/84) to share your usages of this Action!
61
59
62
60
Check out [this blog post](https://dev.to/bobheadxi/branch-previews-with-google-app-engine-and-github-actions-3pco) for a bit of background on the origins of this project.
63
61
64
62
## Configuration
65
63
66
-
The following [`inputs`](https://help.github.com/en/articles/workflow-syntax-for-github-actions#jobsjob_idstepswith) configuration options are for _all steps_:
64
+
The following [`inputs`](https://help.github.com/en/articles/workflow-syntax-for-github-actions#jobsjob_idstepswith) configuration options are for *all steps*:
| `step` | | One of [`start`](#step-start), [`finish`](#step-finish), [`deactivate-env`](#step-deactivate-env), or [`delete-env`](#step-delete-env) |
71
-
| `token` | `${{ github.token }}` | provide your `${{ github.token }}` or `${{ secrets.GITHUB_TOKEN }}` for API access |
69
+
| `token` | `${{ github.token }}` | provide your `${{ github.token }}` or `${{ secrets.GITHUB_TOKEN }}` for API access |
72
70
| `env` | | identifier for environment to deploy to (e.g. `staging`, `prod`, `main`) |
73
71
| `repository` | Current repository | target a specific repository for updates, e.g. `owner/repo` |
74
72
| `logs` | URL to GitHub commit checks | URL of your deployment logs |
75
73
| `desc` | GitHub-generated description | description for this deployment |
76
-
| `ref` | `github.ref` | Specify a particular git ref to use, (e.g. `${{ github.head_ref }}`) |
74
+
| `ref` | `github.ref` | Specify a particular git ref to use, (e.g. `${{ github.head_ref }}`) |
77
75
78
76
### `step: start`
79
77
@@ -84,14 +82,13 @@ This is best used on the `push: { branches: [ ... ] }` event, but you can also h
84
82
85
83
In addition to the [core configuration](#configuration), the following [`inputs`](https://help.github.com/en/articles/workflow-syntax-for-github-actions#jobsjob_idstepswith) are available:
| `deployment_id` | | Use an existing deployment instead of creating a new one (e.g. `${{ github.event.deployment.id }}`) |
90
-
| `override` | `false` | whether to mark existing deployments of this environment as inactive |
91
-
| `auto_merge` | `false` | Attempts to automatically merge the default branch into the requested ref, if it's behind the default branch |
92
-
| `required_contexts` | `'null'` | The names of any status contexts to verify against, separated by newlines. To bypass checking entirely, pass a string called `null` |
93
-
| `payload` | | JSON-formatted dictionary with extra information about the deployment |
94
-
| `task` | `'deploy'` | change the task associated with this deployment, can be any string |
| `deployment_id` | | Use an existing deployment instead of creating a new one (e.g. `${{ github.event.deployment.id }}`) |
88
+
| `override` | `false` | whether to mark existing deployments of this environment as inactive |
89
+
| `payload` | | JSON-formatted dictionary with extra information about the deployment |
90
+
| `task` | `'deploy'` | change the task associated with this deployment, can be any string
91
+
95
92
96
93
The following [`outputs`](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/contexts-and-expression-syntax-for-github-actions#steps-context) are available:
97
94
@@ -109,20 +106,20 @@ The following [`outputs`](https://help.github.com/en/actions/automating-your-wor
109
106
on:
110
107
push:
111
108
branches:
112
-
- main
109
+
- main
113
110
114
111
jobs:
115
112
deploy:
116
113
steps:
117
-
- name: start deployment
118
-
uses: bobheadxi/deployments@v1
119
-
id: deployment
120
-
with:
121
-
step: start
122
-
env: release
123
-
124
-
- name: do my deploy
125
-
# ...
114
+
- name: start deployment
115
+
uses: bobheadxi/deployments@v1
116
+
id: deployment
117
+
with:
118
+
step: start
119
+
env: release
120
+
121
+
- name: do my deploy
122
+
# ...
126
123
```
127
124
128
125
</p>
@@ -142,15 +139,15 @@ jobs:
142
139
deploy:
143
140
runs-on: ubuntu-latest
144
141
steps:
145
-
- name: start deployment
146
-
uses: bobheadxi/deployments@v1
147
-
id: deployment
148
-
with:
149
-
step: start
150
-
env: integration
151
-
152
-
- name: do my deploy
153
-
# ...
142
+
- name: start deployment
143
+
uses: bobheadxi/deployments@v1
144
+
id: deployment
145
+
with:
146
+
step: start
147
+
env: integration
148
+
149
+
- name: do my deploy
150
+
# ...
154
151
```
155
152
156
153
</p>
@@ -185,21 +182,21 @@ In addition to the [core configuration](#configuration), the following [`inputs`
@@ -290,4 +287,4 @@ Then you can change your workflow to target the `v1` tag, and automatically rece
290
287
291
288
The `token` configuration variable now has a default value so if you are happy with the default (`${{ github.secret }}`) you can simplify the action configuration by removing this from your actions.
0 commit comments