-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (41 loc) · 1.28 KB
/
backup.yml
File metadata and controls
51 lines (41 loc) · 1.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: Backup Sourceforge
on:
schedule:
- cron: "9/15 * * * *"
workflow_dispatch:
permissions: {}
env:
FORCE_COLOR: "1"
jobs:
backup:
if: github.repository_owner == 'docutils'
runs-on: ubuntu-24.04
timeout-minutes: 10
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
persist-credentials: true
- name: Configure git
run: |
git config user.name "Adam Turner"
git config user.email "9087854+aa-turner@users.noreply.github.com"
# https://sourceforge.net/p/forge/documentation/rsync%20Backups/
- name: Fetch Docutils SVN repository
run: >
rsync
--archive --human-readable --partial --progress --verbose --itemize-changes
"svn.code.sf.net::p/docutils/code/*"
docutils-svnroot
- name: Fetch CVS archives
if: github.event_name == 'workflow_dispatch'
run: ./archive-cvs.sh
- name: Fetch Docutils release tarballs
if: github.event_name == 'workflow_dispatch'
run: ./archive-docutils-files.sh
- name: Push to GitHub
run: |
git add --all
git commit -m "SF backup: $(date --utc +'%Y-%m-%d %H:%M:%S GMT')" || echo "No changes to commit"
git push origin master --force-with-lease || echo "Nothing to push"