File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed
Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Mirror repository to mattrassurance org
2+ on :
3+ workflow_dispatch :
4+ push :
5+ branches :
6+ - master
7+ - main
8+
9+ jobs :
10+ MirrorRepoToMATTRAssurance :
11+ runs-on : ubuntu-latest
12+ permissions :
13+ contents : read
14+ id-token : write
15+ steps :
16+ - name : Checkout
17+ uses : actions/checkout@v4
18+
19+ - name : mirror repo
20+ run : |
21+ rm -r .git
22+ rm -r .github
23+ git init --initial-branch=${{ github.ref_name }}
24+ git config --local user.name ${{ secrets.MATTRASSURANCE_GIT_USER_NAME }}
25+ git config --local user.email ${{ secrets.MATTRASSURANCE_GIT_USER_EMAIL }}
26+ git add .
27+ git commit -m "Backing up ${{ github.repository }} to mattrassurance org"
28+ git remote add origin https://${{ secrets.MATTRASSURANCE_GIT_USER_NAME }}:${{ secrets.MATTRASSURANCE_GIT_USER_PAT }}@github.com/mattrassurance/${{ github.event.repository.name }}.git
29+ git push origin ${{ github.ref_name }} --force
You can’t perform that action at this time.
0 commit comments