Update main.yml #8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |