Skip to content

Update main.yml

Update main.yml #8

Workflow file for this run

name: Mirror to SourceForge
on:
push:
branches:
- master
jobs:
mirror:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
with:
fetch-depth: 0 # Perform a full clone instead of a shallow clone
- name: Set up SSH
run: |
mkdir -p ~/.ssh
echo "${{ secrets.SOURCEFORGE_SSH_KEY }}" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
ssh-keyscan -t rsa git.code.sf.net >> ~/.ssh/known_hosts
- name: Debug Git Remote
run: |
echo "Checking Git remote..."
git remote add sourceforge ssh://[email protected]/p/slickstack/code
git remote -v
- name: Push to SourceForge
run: |
echo "Pushing code to SourceForge..."
git push sourceforge master --force