Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update docs (and bump release) #364

Merged
merged 2 commits into from
Jan 29, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

12 changes: 9 additions & 3 deletions docs/checks.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Checks ✅

> 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)
> 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)

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.

Expand Down Expand Up @@ -34,7 +34,7 @@ This example shows how you can use the `checks` option to require all CI checks
uses: github/[email protected] # replace with the latest version of this Action
id: branch-deploy
with:
checks: "all" # all CI checks (required or not) must pass before a deployment can start
checks: "all" # all CI checks (required or not) must pass before a deployment can start to any environment
```

### Example 2: Only Required CI Checks Must Pass
Expand All @@ -46,7 +46,7 @@ This example shows how you can use the `checks` option to require only the **req
uses: github/[email protected] # replace with the latest version of this Action
id: branch-deploy
with:
checks: "required" # only required CI checks must pass before a deployment can start
checks: "required" # only required CI checks must pass before a deployment can start to any environment
```

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.
Expand All @@ -55,13 +55,19 @@ The screenshot below demonstrates how this option works in a real-world scenario

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

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:

```yaml
- uses: github/[email protected] # replace with the latest version of this Action
id: branch-deploy
with:
checks: 'test1' # we only care about the check named `test1`
```

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.

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.

> If you project has a lot of CI tests, no worries! You could do `test1,test2,<etc>` to specify multiple checks that must pass.

![only-using-checks-for-one-ci-job.png](assets/only-using-checks-for-one-ci-job.png)
Expand Down
2 changes: 1 addition & 1 deletion src/version.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
// - v1.1.1-rc.1
// - etc

export const VERSION = 'v10.2.0'
export const VERSION = 'v10.3.0'