[FEATURE] S3 Action
This commit is contained in:
parent
3dbcf39ece
commit
881621c35c
1 changed files with 41 additions and 0 deletions
41
action.yml
Normal file
41
action.yml
Normal file
|
@ -0,0 +1,41 @@
|
|||
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}}
|
||||
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:
|
||||
# Checkout Repository
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
path: ${{ inputs.repository-dir }}
|
||||
- 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 }}
|
||||
MIRROR_TARGET: ${{ inputs.s3-backup-path }}
|
||||
MIRROR_SOURCE: ${{ inputs.repository-dir }}
|
||||
with:
|
||||
args: --overwrite --remove
|
Loading…
Add table
Add a link
Reference in a new issue