Skip to content

.github/workflows/backup_daily.yml #618

.github/workflows/backup_daily.yml

.github/workflows/backup_daily.yml #618

Workflow file for this run

on:
push:
branches:
- backup
schedule:
- cron: '0 0 * * *' # every day at midnight
jobs:
backup_daily:
runs-on: ubuntu-latest
environment: backup
strategy:
matrix:
repository: [infrastructure, processing-sentinel-1, processing-sentinel-2, processing-sentinel-3, production-common, reference-system-documentation, reference-system-software, rs-config, rs-issues, user-web-client, website]
steps:
- name: Extract date
shell: bash
run: echo "##[set-output name=date;]$(date +%Y%m%dT%H%M%S)"
id: extract_date
- name: Checkout
uses: actions/checkout@v2
with:
repository: COPRS/${{ matrix.repository }}
path: ${{ matrix.repository }}
fetch-depth: 0
token: ${{ secrets.TOKEN }}
- name: Backup
uses: peter-evans/s3-backup@v1
env:
ACCESS_KEY_ID: ${{ secrets.ACCESS_KEY_ID }}
MIRROR_TARGET: ${{ secrets.MIRROR_TARGET }}/COPRS/${{ matrix.repository }}/DAILY_${{ steps.extract_date.outputs.date }}/
SECRET_ACCESS_KEY: ${{ secrets.SECRET_ACCESS_KEY }}
STORAGE_SERVICE_URL: ${{ secrets.STORAGE_SERVICE_URL }}
MIRROR_SOURCE: ${{ matrix.repository }}
with:
args: --overwrite --remove