-
Notifications
You must be signed in to change notification settings - Fork 8
36 lines (30 loc) · 889 Bytes
/
sf-mirror.yml
File metadata and controls
36 lines (30 loc) · 889 Bytes
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
name: Mirror to SourceForge
on:
push:
branches:
- main
- master
jobs:
sync:
runs-on: ubuntu-latest
steps:
# Checkout GitHub repo with full history
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0 # important! fetch all commits
# Set up SSH
- name: Set up SSH
run: |
mkdir -p ~/.ssh
echo "${{ secrets.SF_PRIVATE_KEY }}" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
ssh-keyscan -t rsa git.code.sf.net >> ~/.ssh/known_hosts
# Add SourceForge remote
- name: Add SourceForge remote
run: git remote add sourceforge "ssh://haris-23@git.code.sf.net/p/bjh-os/code"
# Push all branches and tags
- name: Push to SourceForge
run: |
git push sourceforge --all
git push sourceforge --tags