[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"
|
name: "S3 Backup Action"
|
||||||
description: "Backup to S3 Bucket"
|
description: "Backup to S3 Bucket"
|
||||||
inputs:
|
inputs:
|
||||||
s3-backup-endpoint:
|
infisical-token:
|
||||||
description: "S3 Backup Endpoint"
|
description: Infisical token for backup envars
|
||||||
required: false
|
required: true
|
||||||
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}}
|
|
||||||
s3-backup-path:
|
s3-backup-path:
|
||||||
description: "Workspace to setup Oasis"
|
description: "Workspace to setup Oasis"
|
||||||
required: false
|
required: false
|
||||||
default: backups/gitea-repositories/${{ gitea.repository }}
|
default: backups/gitea-repositories/${{ gitea.repository }}
|
||||||
repository-dir:
|
|
||||||
description: "Directory to clone the Repository to"
|
|
||||||
required: false
|
|
||||||
default: ${{ gitea.workspace }}/repo
|
|
||||||
runs:
|
runs:
|
||||||
using: "composite"
|
using: "composite"
|
||||||
steps:
|
steps:
|
||||||
|
@ -28,14 +15,21 @@ runs:
|
||||||
- name: Checkout Repository
|
- name: Checkout Repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
with:
|
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
|
- name: S3 Backup
|
||||||
uses: peter-evans/s3-backup@v1
|
uses: peter-evans/s3-backup@v1
|
||||||
env:
|
env:
|
||||||
STORAGE_SERVICE_URL: ${{ inputs.s3-backup-endpoint }}
|
STORAGE_SERVICE_URL: ${{ env.DEVOPS_GITEA_ELYSIUM_ORG_S3_ENDPOINT }}
|
||||||
ACCESS_KEY_ID: ${{ inputs.s3-backup-key-id }}
|
ACCESS_KEY_ID: ${{ env.DEVOPS_GITEA_ELYSIUM_ORG_S3_KEY_ID }}
|
||||||
SECRET_ACCESS_KEY: ${{ inputs.s3-backup-key }}
|
SECRET_ACCESS_KEY: ${{ env.DEVOPS_GITEA_ELYSIUM_ORG_S3_KEY }}
|
||||||
MIRROR_TARGET: ${{ inputs.s3-backup-path }}
|
MIRROR_TARGET: ${{ inputs.s3-backup-path }}
|
||||||
MIRROR_SOURCE: ${{ inputs.repository-dir }}
|
MIRROR_SOURCE: ${{ gitea.workspace }}/repo
|
||||||
with:
|
with:
|
||||||
args: --overwrite --remove
|
args: --overwrite --remove
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue