Dead key fix #65
This file contains hidden or 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: SourceForge mirror | |
| on: | |
| push: | |
| branches: | |
| - '**' | |
| jobs: | |
| mirror: | |
| environment: sfenv | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup SSH | |
| env: | |
| SF_SSH_KEY: ${{ secrets.SF_SSH_KEY }} | |
| run: | | |
| mkdir -p ~/.ssh | |
| echo "$SF_SSH_KEY" > ~/.ssh/id_rsa | |
| chmod 600 ~/.ssh/id_rsa | |
| ssh-keyscan git.code.sf.net >> ~/.ssh/known_hosts | |
| cat > ~/.ssh/config << 'EOF' | |
| Host git.code.sf.net | |
| IdentityFile ~/.ssh/id_rsa | |
| IdentitiesOnly yes | |
| PubkeyAuthentication yes | |
| PasswordAuthentication no | |
| PreferredAuthentications publickey | |
| EOF | |
| chmod 600 ~/.ssh/config | |
| - name: Configure Git | |
| run: | | |
| git config --global user.email "actions@github.com" | |
| git config --global user.name "GitHub Actions" | |
| - name: Push to SourceForge | |
| run: | | |
| git remote add sf ssh://${{ secrets.SF_USERNAME }}@git.code.sf.net/p/${{ secrets.SF_PROJECT }}/code || true | |
| git push sf ${{ github.ref_name }} --force | |
| git push sf --tags --force |