Update .gitea/workflows/s3-repo-backup.yml
This commit is contained in:
parent
e31dc4f555
commit
496da63d95
1 changed files with 26 additions and 27 deletions
|
@ -2,31 +2,30 @@ name: S3 Repo Backup
|
||||||
run-name: ${{ gitea.actor }} S3 Repo Backup
|
run-name: ${{ gitea.actor }} S3 Repo Backup
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ master ]
|
branches: [ master ]
|
||||||
|
|
||||||
env:
|
|
||||||
S3_BACKUP_ENDPOINT: https://s3.dunemask.net
|
|
||||||
S3_BACKUP_KEY_ID: gitea-repo-backup
|
|
||||||
S3_BACKUP_KEY: ${{ secrets.S3_REPO_BACKUP_KEY }}
|
|
||||||
REPO_DIR: ${{ gitea.workspace }}/${{ gitea.respository }}
|
|
||||||
jobs:
|
|
||||||
s3-repo-backup:
|
|
||||||
steps:
|
|
||||||
- name: Checkout repository
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
with:
|
|
||||||
path: ${{ env.REPO_DIR }}
|
|
||||||
- name: S3 Backup
|
|
||||||
uses: peter-evans/s3-backup@v1
|
|
||||||
env:
|
|
||||||
ACCESS_KEY_ID: ${{ env.S3_BACKUP_KEY_ID }}
|
|
||||||
SECRET_ACCESS_KEY: ${{ env.S3_BACKUP_KEY }}
|
|
||||||
MIRROR_SOURCE: ${{ env.REPO_DIR }}
|
|
||||||
MIRROR_TARGET: repository-backups/${{ gitea.repository }}
|
|
||||||
STORAGE_SERVICE_URL: ${{env.S3_BACKUP_ENDPOINT}}
|
|
||||||
with:
|
|
||||||
args: --overwrite --remove
|
|
||||||
- name: Status Alert
|
|
||||||
if: always()
|
|
||||||
run: echo "The Job ended with status ${{ job.status }}."
|
|
||||||
|
|
||||||
|
env:
|
||||||
|
S3_BACKUP_ENDPOINT: https://s3.dunemask.net
|
||||||
|
S3_BACKUP_KEY_ID: gitea-repo-backup
|
||||||
|
S3_BACKUP_KEY: ${{ secrets.S3_REPO_BACKUP_KEY }}
|
||||||
|
REPO_DIR: ${{ gitea.workspace }}/${{ gitea.respository }}
|
||||||
|
jobs:
|
||||||
|
s3-repo-backup:
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
path: ${{ env.REPO_DIR }}
|
||||||
|
- name: S3 Backup
|
||||||
|
uses: peter-evans/s3-backup@v1
|
||||||
|
env:
|
||||||
|
ACCESS_KEY_ID: ${{ env.S3_BACKUP_KEY_ID }}
|
||||||
|
SECRET_ACCESS_KEY: ${{ env.S3_BACKUP_KEY }}
|
||||||
|
MIRROR_SOURCE: ${{ env.REPO_DIR }}
|
||||||
|
MIRROR_TARGET: repository-backups/${{ gitea.repository }}
|
||||||
|
STORAGE_SERVICE_URL: ${{env.S3_BACKUP_ENDPOINT}}
|
||||||
|
with:
|
||||||
|
args: --overwrite --remove
|
||||||
|
- name: Status Alert
|
||||||
|
if: always()
|
||||||
|
run: echo "The Job ended with status ${{ job.status }}."
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue