Compare commits
21 commits
discord-st
...
s3-backup
Author | SHA1 | Date | |
---|---|---|---|
bf54b80924 | |||
b8805d941b | |||
f3acd807bf | |||
181c35fac5 | |||
f4f89dad0d | |||
f0038b6b69 | |||
962ca38ff9 | |||
ba73b418a8 | |||
30096f817f | |||
bb8787fded | |||
1e3c32b3e7 | |||
75bd9ebc6d | |||
8fd38af4f8 | |||
8646f62cbe | |||
41d4305f3a | |||
2dc6d1bbd1 | |||
02ebb4634f | |||
4d55f5c1e7 | |||
7b513727bb | |||
26eff76d90 | |||
881621c35c |
1 changed files with 46 additions and 0 deletions
46
action.yml
Normal file
46
action.yml
Normal file
|
@ -0,0 +1,46 @@
|
||||||
|
name: "S3 Backup Action"
|
||||||
|
description: "Backup to S3 Bucket"
|
||||||
|
inputs:
|
||||||
|
infisical-token:
|
||||||
|
description: Infisical token for backup envars
|
||||||
|
required: true
|
||||||
|
infisical-project:
|
||||||
|
description: Infisical Project
|
||||||
|
required: true
|
||||||
|
s3-backup-path:
|
||||||
|
description: "Workspace to setup Oasis"
|
||||||
|
required: false
|
||||||
|
default: backups/forgejo-repositories/${{ gitea.repository }}
|
||||||
|
runs:
|
||||||
|
using: "composite"
|
||||||
|
steps:
|
||||||
|
# Checkout Repository
|
||||||
|
- name: Checkout Repository
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
path: repo
|
||||||
|
# Load Backup Envars
|
||||||
|
- name: Setup Backup Envars
|
||||||
|
uses: https://forgejo.dunemask.dev/elysium/elysium-actions@infisical-env
|
||||||
|
with:
|
||||||
|
infisical-token: ${{ inputs.infisical-token }}
|
||||||
|
project-id: ${{ inputs.infisical-project }}
|
||||||
|
secret-envs: edge
|
||||||
|
secret-paths: /devops/forgejo-backups
|
||||||
|
# Fix Envar Format
|
||||||
|
- name: Fix Env Format
|
||||||
|
run: |
|
||||||
|
echo BACKUP_S3_ENDPOINT=${{ env.DEVOPS_FORGEJO_ELYSIUM_ORG_S3_ENDPOINT }} >> $GITHUB_ENV
|
||||||
|
echo BACKUP_S3_KEY_ID=${{ env.DEVOPS_FORGEJO_ELYSIUM_ORG_S3_KEY_ID }} >> $GITHUB_ENV
|
||||||
|
echo BACKUP_S3_KEY=${{ env.DEVOPS_FORGEJO_ELYSIUM_ORG_S3_KEY }} >> $GITHUB_ENV
|
||||||
|
# Backup Repository
|
||||||
|
- name: S3 Backup
|
||||||
|
uses: https://github.com/peter-evans/s3-backup@v1
|
||||||
|
env:
|
||||||
|
STORAGE_SERVICE_URL: ${{ env.BACKUP_S3_ENDPOINT }}
|
||||||
|
ACCESS_KEY_ID: ${{ env.BACKUP_S3_KEY_ID }}
|
||||||
|
SECRET_ACCESS_KEY: ${{ env.BACKUP_S3_KEY }}
|
||||||
|
MIRROR_TARGET: ${{ inputs.s3-backup-path }}
|
||||||
|
MIRROR_SOURCE: repo
|
||||||
|
with:
|
||||||
|
args: --overwrite --remove
|
Loading…
Add table
Add a link
Reference in a new issue