[FEATURE] Initial S3 Concept
This commit is contained in:
parent
881621c35c
commit
26eff76d90
1 changed files with 15 additions and 21 deletions
36
action.yml
36
action.yml
|
@ -1,26 +1,13 @@
|
|||
name: "S3 Backup Action"
|
||||
description: "Backup to S3 Bucket"
|
||||
inputs:
|
||||
s3-backup-endpoint:
|
||||
description: "S3 Backup Endpoint"
|
||||
required: false
|
||||
default: ${{ secrets.S3_BACKUP_ENDPOINT }}
|
||||
s3-backup-key-id:
|
||||
description: "S3 Backup Access Key ID"
|
||||
required: false
|
||||
default: ${{ secrets.S3_BACKUP_KEY_ID}}
|
||||
s3-backup-key:
|
||||
description: "S3 Backup Access Key"
|
||||
required: false
|
||||
default: ${{ secrets.S3_BACKUP_KEY}}
|
||||
infisical-token:
|
||||
description: Infisical token for backup envars
|
||||
required: true
|
||||
s3-backup-path:
|
||||
description: "Workspace to setup Oasis"
|
||||
required: false
|
||||
default: backups/gitea-repositories/${{ gitea.repository }}
|
||||
repository-dir:
|
||||
description: "Directory to clone the Repository to"
|
||||
required: false
|
||||
default: ${{ gitea.workspace }}/repo
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
|
@ -28,14 +15,21 @@ runs:
|
|||
- name: Checkout Repository
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
path: ${{ inputs.repository-dir }}
|
||||
path: ${{ gitea.workspace }}/repo
|
||||
# Load Backup Envars
|
||||
- name: Setup Backup Envars
|
||||
uses: https://gitea.dunemask.dev/elysium/elysium-actions@infisical-env
|
||||
with:
|
||||
infisical-token: ${{ inputs.infisical-token }}
|
||||
secret-envs: edge
|
||||
secret-paths: /devops/gitea-backups
|
||||
- name: S3 Backup
|
||||
uses: peter-evans/s3-backup@v1
|
||||
env:
|
||||
STORAGE_SERVICE_URL: ${{ inputs.s3-backup-endpoint }}
|
||||
ACCESS_KEY_ID: ${{ inputs.s3-backup-key-id }}
|
||||
SECRET_ACCESS_KEY: ${{ inputs.s3-backup-key }}
|
||||
STORAGE_SERVICE_URL: ${{ env.DEVOPS_GITEA_ELYSIUM_ORG_S3_ENDPOINT }}
|
||||
ACCESS_KEY_ID: ${{ env.DEVOPS_GITEA_ELYSIUM_ORG_S3_KEY_ID }}
|
||||
SECRET_ACCESS_KEY: ${{ env.DEVOPS_GITEA_ELYSIUM_ORG_S3_KEY }}
|
||||
MIRROR_TARGET: ${{ inputs.s3-backup-path }}
|
||||
MIRROR_SOURCE: ${{ inputs.repository-dir }}
|
||||
MIRROR_SOURCE: ${{ gitea.workspace }}/repo
|
||||
with:
|
||||
args: --overwrite --remove
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue