Merge pull request #37 from Zitzeronion/dependabot/github_actions/cod… #234
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: Sync | |
on: | |
- push | |
jobs: | |
sync: | |
name: Synchronize with jugit.fz-juelich.de | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: add remote | |
run: git remote add jugit https://jugit.fz-juelich.de/compflu/swalbe.jl | |
- name: enable locally stored credentials | |
run: git config credential.helper store | |
- name: add credentials from projects secrets | |
env: | |
JUGIT_USER: ${{ secrets.jugituser }} | |
JUGIT_PASS: ${{ secrets.jugitpass }} | |
run: echo "https://$JUGIT_USER:[email protected]" >| ~/.git-credentials | |
- name: mirror push to new remote | |
run: git push --prune jugit +refs/remotes/origin/*:refs/heads/* +refs/tags/*:refs/tags/* | |