Initial commit with backup workflow
This commit is contained in:
commit
682c747964
1 changed files with 20 additions and 0 deletions
20
.forgejo/workflows/backup-to-s3.yml
Normal file
20
.forgejo/workflows/backup-to-s3.yml
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
name: Scheduled S3 Code Backup
|
||||
on:
|
||||
schedule:
|
||||
# This cron expression means "At minute 0 past every 3rd hour"
|
||||
- cron: '0 */3 * * *'
|
||||
# It's also helpful to include workflow_dispatch so you can trigger it manually if needed
|
||||
workflow_dispatch:
|
||||
jobs:
|
||||
backup-code:
|
||||
runs-on: ubuntu-latest
|
||||
container: node:22
|
||||
steps:
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v3
|
||||
- name: Install AWS CLI
|
||||
run: |
|
||||
apt-get update && apt-get install -y awscli
|
||||
- name: Sync entire repository to S3 Backup Bucket
|
||||
run: |
|
||||
aws s3 sync . s3://forgeocodespace --delete
|
||||
Loading…
Reference in a new issue