Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aidanmelen/no-deploy-on-friday-action
This action aims to codify the unspoken rule of "No Deployments on Friday". This is achieved by simply terminating the action with a non-zero exit code when the date conditions are met.
https://github.com/aidanmelen/no-deploy-on-friday-action
deployment github-actions
Last synced: about 2 months ago
JSON representation
This action aims to codify the unspoken rule of "No Deployments on Friday". This is achieved by simply terminating the action with a non-zero exit code when the date conditions are met.
- Host: GitHub
- URL: https://github.com/aidanmelen/no-deploy-on-friday-action
- Owner: aidanmelen
- Created: 2021-08-29T00:56:34.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-09-01T23:46:28.000Z (over 3 years ago)
- Last Synced: 2024-03-15T05:02:15.721Z (10 months ago)
- Topics: deployment, github-actions
- Language: Python
- Homepage:
- Size: 30.3 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[![Lint](https://github.com/aidanmelen/no-deploy-on-friday-action/actions/workflows/lint.yml/badge.svg?branch=main)](https://github.com/aidanmelen/no-deploy-on-friday-action/actions/workflows/lint.yml)
[![Tests](https://github.com/aidanmelen/no-deploy-on-friday-action/actions/workflows/tests.yml/badge.svg)](https://github.com/aidanmelen/no-deploy-on-friday-action/actions/workflows/tests.yml)
[![End2End](https://github.com/aidanmelen/no-deploy-on-friday-action/actions/workflows/e2e.yml/badge.svg)](https://github.com/aidanmelen/no-deploy-on-friday-action/actions/workflows/e2e.yml)# No Deploy on Friday action
This action aims to codify the unwritten rules like "No Deployments on Friday". This is achieved by simply terminating the action with a non-zero exit code when the date conditions are met; which in turn, causes the remaining steps in the workflow to cancel. At last, your weekend is safe once again.
## Inputs
## `NO_DEPLOYMENT_DAYS`
**Optional** A comma delimited list of weekdays that we do not deploy on. Defaults to `Friday, Saturday, Sunday`.
## `TZ`
**Optional** The timezone name. See Wikipedia for the complete list of timezone names: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones. Defaults to `UTC`.
## `COUNTRY`
**Optional** The country of origin. This determines which the national holiday calendar to use. Defaults to `US`
## `HOLIDAYS`
**Optional** Whether to prevent deployments on national holidays. This depends on the `COUNTRY` input. This is applied in addition to the `NO_DEPLOYMENT_DAYS` input. Defaults to `true`
## Outputs
## `reason`
The reason for the outcome.
## Example usage
Simple example.
```yaml
- name: Checkout
uses: actions/checkout@v2
- name: Weekend Saver
uses: aidanmelen/[email protected]
id: weekend-saver
- name: Reason For Previous Step
if: always()
run: echo "${{ steps.no-deploy-on-friday.outputs.reason }}"
- name: Mock Deployment
run: echo "Deploy something here..."
```Complete example.
```yaml
- name: Checkout
uses: actions/checkout@v2
- name: Weekend Saver
uses: aidanmelen/[email protected]
id: weekend-saver
env:
NO_DEPLOYMENT_DAYS: 'Friday, Saturday, Sunday'
TZ: 'MST'
COUNTRY: 'US'
HOLIDAYS: true
- name: Reason For Previous Step
if: always()
run: echo "${{ steps.no-deploy-on-friday.outputs.reason }}"
- name: Mock Deployment
run: echo "Deploy something here..."
```