Skip to content

Commit 5f3864a

Browse files
committed
revert erroneous changes
1 parent be67449 commit 5f3864a

File tree

2 files changed

+93
-101
lines changed

2 files changed

+93
-101
lines changed

.vscode/settings.json

Lines changed: 0 additions & 5 deletions
This file was deleted.

README.md

Lines changed: 93 additions & 96 deletions
Original file line numberDiff line numberDiff line change
@@ -5,75 +5,73 @@ Instead of exposing convoluted Action configuration that mirrors that of the [Gi
55

66
> 📢 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)!
77
8-
- [GitHub Deployments ](#github-deployments--)
9-
- [Configuration](#configuration)
10-
- [`step: start`](#step-start)
11-
- [`step: finish`](#step-finish)
12-
- [`step: deactivate-env`](#step-deactivate-env)
13-
- [`step: delete-env`](#step-delete-env)
14-
- [Debugging](#debugging)
15-
- [Migrating to v1](#migrating-to-v1)
16-
- [Migrating to v1.2.0](#migrating-to-v120)
8+
- [Configuration](#configuration)
9+
- [`step: start`](#step-start)
10+
- [`step: finish`](#step-finish)
11+
- [`step: deactivate-env`](#step-deactivate-env)
12+
- [`step: delete-env`](#step-delete-env)
13+
- [Debugging](#debugging)
14+
- [Migrating to v1](#migrating-to-v1)
1715

1816
A simple example:
1917

2018
```yml
2119
on:
2220
push:
2321
branches:
24-
- main
22+
- main
2523

2624
jobs:
2725
deploy:
2826
runs-on: ubuntu-latest
2927
steps:
30-
- name: start deployment
31-
uses: bobheadxi/deployments@v1
32-
id: deployment
33-
with:
34-
step: start
35-
token: ${{ secrets.GITHUB_TOKEN }}
36-
env: release
37-
38-
- name: do my deploy
39-
# ...
40-
41-
- name: update deployment status
42-
uses: bobheadxi/deployments@v1
43-
if: always()
44-
with:
45-
step: finish
46-
token: ${{ secrets.GITHUB_TOKEN }}
47-
status: ${{ job.status }}
48-
env: ${{ steps.deployment.outputs.env }}
49-
deployment_id: ${{ steps.deployment.outputs.deployment_id }}
28+
- name: start deployment
29+
uses: bobheadxi/deployments@v1
30+
id: deployment
31+
with:
32+
step: start
33+
token: ${{ secrets.GITHUB_TOKEN }}
34+
env: release
35+
36+
- name: do my deploy
37+
# ...
38+
39+
- name: update deployment status
40+
uses: bobheadxi/deployments@v1
41+
if: always()
42+
with:
43+
step: finish
44+
token: ${{ secrets.GITHUB_TOKEN }}
45+
status: ${{ job.status }}
46+
env: ${{ steps.deployment.outputs.env }}
47+
deployment_id: ${{ steps.deployment.outputs.deployment_id }}
5048
```
5149
5250
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:
5351
5452
- [`github/super-linter`](https://sourcegraph.com/search?q=context:global+repo:%5Egithub%5C.com/github/super-linter%24+file:%5E%5C.github/workflows+bobheadxi/deployments&patternType=literal) [![GitHub Repo stars](https://img.shields.io/github/stars/github/super-linter?style=social)](https://github.com/github/super-linter) - [GitHub's all-in-one linter Action](https://github.blog/2020-06-18-introducing-github-super-linter-one-linter-to-rule-them-all/)
5553
- [`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) [![GitHub Repo stars](https://img.shields.io/github/stars/mxcl/PromiseKit?style=social)](https://github.com/mxcl/PromiseKit) - promises for Swift and Objective-C
56-
- [`saleor/saleor`](https://sourcegraph.com/search?q=repo:%5Egithub%5C.com/saleor/saleor%24+bobheadxi/deployments&patternType=literal) [![GitHub Repo stars](https://img.shields.io/github/stars/saleor/saleor?style=social)](https://github.com/saleor/saleor) - modular, high performance, headless e-commerce storefront
54+
- [`saleor/saleor`](https://sourcegraph.com/search?q=repo:%5Egithub%5C.com/saleor/saleor%24+bobheadxi/deployments\&patternType=literal) [![GitHub Repo stars](https://img.shields.io/github/stars/saleor/saleor?style=social)](https://github.com/saleor/saleor) - modular, high performance, headless e-commerce storefront
5755
- [`sharetribe/sharetribe`](https://sourcegraph.com/search?q=context:global+repo:%5Egithub%5C.com/sharetribe/sharetribe%24+file:%5E%5C.github/workflows+bobheadxi/deployments&patternType=literal) [![GitHub Repo stars](https://img.shields.io/github/stars/sharetribe/sharetribe?style=social)](https://github.com/sharetribe/sharetribe) - marketplace software
58-
- [`skylines-project/skylines`](https://sourcegraph.com/search?q=repo:%5Egithub%5C.com/skylines-project/skylines%24+bobheadxi/deployments&patternType=literal) [![GitHub Repo stars](https://img.shields.io/github/stars/skylines-project/skylines?style=social)](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) [![GitHub Repo stars](https://img.shields.io/github/stars/skylines-project/skylines?style=social)](https://github.com/skylines-project/skylines) - live tracking, flight database and competition web platform
5957

6058
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!
6159

6260
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.
6361

6462
## Configuration
6563

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*:
6765

6866
| Variable | Default | Purpose |
6967
| ------------ | ---------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
7068
| `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 |
7270
| `env` | | identifier for environment to deploy to (e.g. `staging`, `prod`, `main`) |
7371
| `repository` | Current repository | target a specific repository for updates, e.g. `owner/repo` |
7472
| `logs` | URL to GitHub commit checks | URL of your deployment logs |
7573
| `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 }}`) |
7775

7876
### `step: start`
7977

@@ -84,14 +82,13 @@ This is best used on the `push: { branches: [ ... ] }` event, but you can also h
8482

8583
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:
8684

87-
| Variable | Default | Purpose |
88-
| ------------------- | ---------- | ----------------------------------------------------------------------------------------------------------------------------------- |
89-
| `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 |
85+
| Variable | Default | Purpose |
86+
| --------------- | ------- | --------------------------------------------------------------------------------------------------- |
87+
| `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+
9592

9693
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:
9794

@@ -109,20 +106,20 @@ The following [`outputs`](https://help.github.com/en/actions/automating-your-wor
109106
on:
110107
push:
111108
branches:
112-
- main
109+
- main
113110
114111
jobs:
115112
deploy:
116113
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+
# ...
126123
```
127124

128125
</p>
@@ -142,15 +139,15 @@ jobs:
142139
deploy:
143140
runs-on: ubuntu-latest
144141
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+
# ...
154151
```
155152

156153
</p>
@@ -185,21 +182,21 @@ In addition to the [core configuration](#configuration), the following [`inputs`
185182
jobs:
186183
deploy:
187184
steps:
188-
- name: start deployment
189-
# ... see previous example
190-
191-
- name: do my deploy
192-
# ...
193-
194-
- name: update deployment status
195-
uses: bobheadxi/deployments@v1
196-
if: always()
197-
with:
198-
step: finish
199-
token: ${{ secrets.GITHUB_TOKEN }}
200-
status: ${{ job.status }}
201-
env: ${{ steps.deployment.outputs.env }}
202-
deployment_id: ${{ steps.deployment.outputs.deployment_id }}
185+
- name: start deployment
186+
# ... see previous example
187+
188+
- name: do my deploy
189+
# ...
190+
191+
- name: update deployment status
192+
uses: bobheadxi/deployments@v1
193+
if: always()
194+
with:
195+
step: finish
196+
token: ${{ secrets.GITHUB_TOKEN }}
197+
status: ${{ job.status }}
198+
env: ${{ steps.deployment.outputs.env }}
199+
deployment_id: ${{ steps.deployment.outputs.deployment_id }}
203200
```
204201

205202
</p>
@@ -223,29 +220,29 @@ Refer to the [core configuration](#configuration) for available [`inputs`](https
223220
```yml
224221
on:
225222
pull_request:
226-
types: [closed]
223+
types: [ closed ]
227224
228225
jobs:
229226
prune:
230227
steps:
231-
# see https://dev.to/bobheadxi/branch-previews-with-google-app-engine-and-github-actions-3pco
232-
- name: extract branch name
233-
id: get_branch
234-
shell: bash
235-
env:
236-
PR_HEAD: ${{ github.head_ref }}
237-
run: echo "##[set-output name=branch;]$(echo ${PR_HEAD#refs/heads/} | tr / -)"
238-
239-
- name: do my deployment shutdown
240-
# ...
241-
242-
- name: mark environment as deactivated
243-
uses: bobheadxi/deployments@v1
244-
with:
245-
step: deactivate-env
246-
token: ${{ secrets.GITHUB_TOKEN }}
247-
env: ${{ steps.get_branch.outputs.branch }}
248-
desc: Environment was pruned
228+
# see https://dev.to/bobheadxi/branch-previews-with-google-app-engine-and-github-actions-3pco
229+
- name: extract branch name
230+
id: get_branch
231+
shell: bash
232+
env:
233+
PR_HEAD: ${{ github.head_ref }}
234+
run: echo "##[set-output name=branch;]$(echo ${PR_HEAD#refs/heads/} | tr / -)"
235+
236+
- name: do my deployment shutdown
237+
# ...
238+
239+
- name: mark environment as deactivated
240+
uses: bobheadxi/deployments@v1
241+
with:
242+
step: deactivate-env
243+
token: ${{ secrets.GITHUB_TOKEN }}
244+
env: ${{ steps.get_branch.outputs.branch }}
245+
desc: Environment was pruned
249246
```
250247

251248
</p>

0 commit comments

Comments
 (0)