Skip to content

Commit a75ddfc

Browse files
chore: let mattrassurance workflow to run on ubuntu runner (#205)
1 parent 843aad2 commit a75ddfc

File tree

1 file changed

+14
-8
lines changed

1 file changed

+14
-8
lines changed

.github/workflows/github_clone_assurance.yaml

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,19 @@ jobs:
1111
runs-on: ubuntu-latest
1212
permissions:
1313
contents: read
14+
id-token: write
1415
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v4
18+
1519
- name: mirror repo
16-
uses: mattrinternal/sre-reusable-action/actions/github-clone-assurance@master
17-
with:
18-
github_repository: ${{ env.GITHUB_REPOSITORY }}
19-
github_ref_name: ${{ env.GITHUB_REF_NAME }}
20-
remote_git_user_name: ${{ secrets.MATTRASSURANCE_GIT_USER_NAME }}
21-
remote_git_user_email: ${{ secrets.MATTRASSURANCE_GIT_USER_EMAIL }}
22-
remote_git_user_pat: ${{ secrets.MATTRASSURANCE_GIT_USER_PAT }}
23-
remote_git_repo: 'mattrassurance/sample-apps'
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

0 commit comments

Comments
 (0)