Skip to content

Commit

Permalink
Merge pull request #3 from skpr/cron-pause
Browse files Browse the repository at this point in the history
Add optional cron suspend/resume steps
  • Loading branch information
fubarhouse authored Dec 5, 2023
2 parents 930daa9 + 4d034e1 commit 7bdde31
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ on:
version_from_env:
type: string
description: Get the version to deploy from the environment.
suspend_cron:
type: boolean
default: false
description: Pause Cron operations during the deployment.
post_deploy:
default: make deploy
type: string
Expand Down Expand Up @@ -83,8 +87,14 @@ jobs:
- name: 📦 Package
if: inputs.package
run: skpr package ${{ steps.version.outputs.version }}
- name: ⏸️ Suspend Cron
if: inputs.suspend_cron
run: skpr cron suspend ${{ inputs.env }} --wait
- name: 🚀 Deploy
run: skpr deploy ${{ inputs.env }} ${{ steps.version.outputs.version }}
- name: ▶️ Resume Cron
if: inputs.suspend_cron
run: skpr cron resume ${{ inputs.env }}
- name: 🧹 Post-deploy
run: skpr exec ${{ inputs.env }} ${{ inputs.post_deploy }}

0 comments on commit 7bdde31

Please sign in to comment.