Skip to content

Commit

Permalink
Don't update staging from production as often as it's not necessary
Browse files Browse the repository at this point in the history
We don't need to update so often and this reduces the use of the minutes per
month we have access to free for GitHub actions (2000 at the time of writing).
See https://docs.github.com/en/billing/managing-billing-for-your-products/managing-billing-for-github-actions/about-billing-for-github-actions#included-storage-and-minutes
  • Loading branch information
luca-vari committed Nov 29, 2024
1 parent 706ea7d commit d70908b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 10 deletions.
10 changes: 0 additions & 10 deletions .github/workflows/backup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,5 @@ jobs:
- name: Run backup script
run: ./infra/backup.sh
shell: bash
env:
CLERK_PRIVATE_SSH_KEY: ${{ secrets.CLERK_PRIVATE_SSH_KEY }}
update_staging:
runs-on: ubuntu-latest
needs: backup
steps:
- uses: actions/checkout@v4
- name: Run backup script
run: ./infra/staging/database-restore.sh
shell: bash
env:
CLERK_PRIVATE_SSH_KEY: ${{ secrets.CLERK_PRIVATE_SSH_KEY }}
16 changes: 16 additions & 0 deletions .github/workflows/staging.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Staging
on:
workflow_dispatch:
schedule:
# Update staging environment at 0415 AEST (18:15 UTC) each Saturday
- cron: "15 18 * * SAT"
jobs:
update_staging:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run backup script
run: ./infra/staging/database-restore.sh
shell: bash
env:
CLERK_PRIVATE_SSH_KEY: ${{ secrets.CLERK_PRIVATE_SSH_KEY }}

0 comments on commit d70908b

Please sign in to comment.