Skip to content
This repository was archived by the owner on Jul 3, 2023. It is now read-only.

chore: [SETI-648] Reduce Workflow Execution Time #9

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
40 changes: 40 additions & 0 deletions .github/workflows/check-no-deploy-window.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Check No Deploy Window
on:
# Runs every Mon-Friday at 4:00 and 10:00 UTC
schedule:
- cron: '0 4,10 * * 1-5'
pull_request:
branches:
- master
jobs:
should_deploy:
runs-on: ubuntu-latest
name: check no deploy window
steps:
- name: is deploy calendar busy?
uses: Typeform/siesta@v1.3
id: siesta
with:
google-credentials: ${{ secrets.siesta_google_credentials }}
google-token: ${{ secrets.siesta_google_token }}
google-calendar-id: ${{ secrets.siesta_google_calendar_id }}
custom-calendar-busy-message: 'There is an event in the Calendar. Deploying not recommended.'
custom-calendar-not-busy-message: 'No event in the Calendar. Feel free to deploy.'
fail-if-busy: false
minutes-interval: 360
- name: set label action based on result
uses: haya14busa/action-cond@v1.0.0
id: condval
with:
cond: ${{steps.siesta.outputs.calendar-busy}}
if_true: add
if_false: remove
- name: add or remove label
uses: Typeform/labeler@v1.2
id: labeler
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
repository-name: ${{ github.repository }}
label: no-deploy-window
label-action: ${{steps.condval.outputs.value}}
base-branch: master