Skip to content

Commit 5c9bf86

Browse files
authored
Merge pull request #364 from github/version-and-checks-docs
Update docs (and bump release)
2 parents de6dba3 + b4db668 commit 5c9bf86

File tree

4 files changed

+12
-6
lines changed

4 files changed

+12
-6
lines changed

dist/index.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/checks.md

+9-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Checks ✅
22

3-
> This feature was originally requested via [#73](https://github.com/github/branch-deploy/issues/73) and further improved in [#321](https://github.com/github/branch-deploy/issues/321)
3+
> This feature was originally requested via [#73](https://github.com/github/branch-deploy/issues/73) and further improved in [#321](https://github.com/github/branch-deploy/issues/321) and [#362](https://github.com/github/branch-deploy/issues/362)
44
55
The branch-deploy Action contains a useful input option to help give developers more control over how CI checks are handled during the deployment process. Some teams may have very strict controls over deployments and require **all status checks** to pass before a deployment can start. In this case, all CI checks must pass and that includes required, or non-required checks. Other teams may have a more relaxed approach and only require certain checks to pass before a deployment can start. This is where the `checks` input option comes in handy.
66

@@ -34,7 +34,7 @@ This example shows how you can use the `checks` option to require all CI checks
3434
uses: github/[email protected] # replace with the latest version of this Action
3535
id: branch-deploy
3636
with:
37-
checks: "all" # all CI checks (required or not) must pass before a deployment can start
37+
checks: "all" # all CI checks (required or not) must pass before a deployment can start to any environment
3838
```
3939
4040
### Example 2: Only Required CI Checks Must Pass
@@ -46,7 +46,7 @@ This example shows how you can use the `checks` option to require only the **req
4646
uses: github/[email protected] # replace with the latest version of this Action
4747
id: branch-deploy
4848
with:
49-
checks: "required" # only required CI checks must pass before a deployment can start
49+
checks: "required" # only required CI checks must pass before a deployment can start to any environment
5050
```
5151

5252
The screenshot below demonstrates how this option works in a real-world scenario. You can see how there are two CI checks defined on the pull request. One is called `test1` which is **required** and **passing**. The other is called `test2` which is **not required** and **failing**. Since the `checks` option is set to `required`, the deployment will start because the required check is passing and is the only status check taken into consideration for a deployment.
@@ -55,13 +55,19 @@ The screenshot below demonstrates how this option works in a real-world scenario
5555

5656
### Example 3: Only specific CI checks must pass (required or not)
5757

58+
If you only care about a specific CI check, you can use the `checks` option with a comma-separated list of checks that must pass. For example, if you only care about the `test1` check, you can do the following:
59+
5860
```yaml
5961
- uses: github/[email protected] # replace with the latest version of this Action
6062
id: branch-deploy
6163
with:
6264
checks: 'test1' # we only care about the check named `test1`
6365
```
6466

67+
This will require that a CI check named `test1` must pass before a deployment (to any environment) can start. If the `test1` check is in any state other than **passing** (successful), the deployment will not start. This option will scan all CI checks (required or not) and only the checks that are specified in the `checks` option will be considered are blocking for deployment. If you have 10 failing CI checks, and only one passing check, and that check is the only one specified in the `checks` option, the deployment will start.
68+
69+
Please note that just because you can _deploy_, doesn't always mean you can merge. You should always review the configuration options of this Action and the branch protection (or ruleset) polices within your repository and ensure that they are configured to meet your team's requirements.
70+
6571
> If you project has a lot of CI tests, no worries! You could do `test1,test2,<etc>` to specify multiple checks that must pass.
6672
6773
![only-using-checks-for-one-ci-job.png](assets/only-using-checks-for-one-ci-job.png)

src/version.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
// - v1.1.1-rc.1
77
// - etc
88

9-
export const VERSION = 'v10.2.0'
9+
export const VERSION = 'v10.3.0'

0 commit comments

Comments
 (0)