Skip to content

Commit

Permalink
Merge pull request #15 from simplybusiness/add-action-config
Browse files Browse the repository at this point in the history
Add documentation
  • Loading branch information
Punit Jain authored Sep 8, 2021
2 parents be09103 + 1c9e0b2 commit 0968348
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 1 deletion.
35 changes: 34 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,38 @@
## What is this?
GitHub Action that blocks all deploys based upon an issue being raised with the "block deploys" label. If someone would want to override the deploy, they would simply title their PR with "emergency deploy" label. This will unblock that specific PR.

Here is an example of [workflow](https://github.com/simplybusiness/deploy-status-action/blob/master/example/workflows/deploy_action.yml) you can use to set up your repository
## Installation

1. Create a file called .github/workflows/deploy-status.yml in your repository with the following YAML (modify as instructed in the comments):

```yaml
name: Deploy Status

on:
pull_request:
branches:
- master
types: [opened, labeled, synchronize]
issues:
types: [labeled, closed]

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Deploy Status Action
uses: simplybusiness/deploy-status-action@v0.1.1
env:
ISSUE_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
AIRBRAKE_KEY: ${{secrets.GH_AIRBRAKE_KEY}}
```
2. Create `block deploys` for blocking the deploy and `emergency deploy` label for overriding the block in your repository.

3. Add deploy status as required check in branch protection.

![Required status](images/require_status.png)

5. To block the deploy now open an issue with label `block deploys`. It will block all the deploys and show th status on PRs.

![Deploy status](images/deploy_status.png)
Binary file added images/deploy_status.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/require_status.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 0968348

Please sign in to comment.