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
+96-93Lines changed: 96 additions & 93 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,73 +5,75 @@ 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
58
+
- [`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
57
59
58
60
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!
59
61
60
62
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.
61
63
62
64
## Configuration
63
65
64
-
The following [`inputs`](https://help.github.com/en/articles/workflow-syntax-for-github-actions#jobsjob_idstepswith) configuration options are for *all steps*:
66
+
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) |
69
-
| `token` | `${{ github.token }}` | provide your `${{ github.token }}` or `${{ secrets.GITHUB_TOKEN }}` for API access |
71
+
| `token` | `${{ github.token }}` | provide your `${{ github.token }}` or `${{ secrets.GITHUB_TOKEN }}` for API access |
70
72
| `env` | | identifier for environment to deploy to (e.g. `staging`, `prod`, `main`) |
71
73
| `repository` | Current repository | target a specific repository for updates, e.g. `owner/repo` |
72
74
| `logs` | URL to GitHub commit checks | URL of your deployment logs |
73
75
| `desc` | GitHub-generated description | description for this deployment |
74
-
| `ref` | `github.ref` | Specify a particular git ref to use, (e.g. `${{ github.head_ref }}`) |
76
+
| `ref` | `github.ref` | Specify a particular git ref to use, (e.g. `${{ github.head_ref }}`) |
75
77
76
78
### `step: start`
77
79
@@ -82,13 +84,14 @@ This is best used on the `push: { branches: [ ... ] }` event, but you can also h
82
84
83
85
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 |
92
95
93
96
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:
94
97
@@ -106,20 +109,20 @@ The following [`outputs`](https://help.github.com/en/actions/automating-your-wor
106
109
on:
107
110
push:
108
111
branches:
109
-
- main
112
+
- main
110
113
111
114
jobs:
112
115
deploy:
113
116
steps:
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
-
# ...
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
+
# ...
123
126
```
124
127
125
128
</p>
@@ -139,15 +142,15 @@ jobs:
139
142
deploy:
140
143
runs-on: ubuntu-latest
141
144
steps:
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
-
# ...
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
+
# ...
151
154
```
152
155
153
156
</p>
@@ -182,21 +185,21 @@ In addition to the [core configuration](#configuration), the following [`inputs`
Copy file name to clipboardExpand all lines: action.yml
+6Lines changed: 6 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -34,6 +34,12 @@ inputs:
34
34
task:
35
35
required: false
36
36
description: The task to assign to the deployment, defaults to 'deploy'
37
+
auto_merge:
38
+
required: false
39
+
description: Attempts to automatically merge the default branch into the requested ref, if it's behind the default branch. Defaults to `false`
40
+
required_contexts:
41
+
required: false
42
+
description: The status contexts to verify against commit status checks, separated by newlines. If you omit this parameter, GitHub verifies all unique contexts before creating a deployment. To bypass checking entirely, pass an empty string. Defaults to `""`.
0 commit comments