Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ki/fix workflow variables #202

Merged
merged 7 commits into from
Jul 24, 2024
20 changes: 13 additions & 7 deletions .github/workflows/github_clone_assurance.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,22 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4

- name: mirror repo
env:
GITHUB_REPOSITORY: ${{ env.GITHUB_REPOSITORY }}
GITHUB_REF_NAME: ${{ env.GITHUB_REF_NAME }}
REMOTE_GIT_USER_NAME: ${{ secrets.MATTRASSURANCE_GIT_USER_NAME }}
REMOTE_GIT_USER_EMAIL: ${{ secrets.MATTRASSURANCE_GIT_USER_EMAIL }}
REMOTE_GIT_USER_PAT: ${{ secrets.MATTRASSURANCE_GIT_USER_PAT }}
shell: bash
run: |
rm -r .git
rm -r .github
git init --initial-branch=${{ env.GITHUB_REF_NAME }}
git config --local user.name ${{ secrets.MATTRASSURANCE_GIT_USER_NAME }}
git config --local user.email ${{ secrets.MATTRASSURANCE_GIT_USER_EMAIL }}
git init --initial-branch=${GITHUB_REF_NAME}
git config --local user.name ${REMOTE_GIT_USER_NAME}
git config --local user.email ${REMOTE_GIT_USER_EMAIL}
git add .
git commit -m "Backing up ${{ env.GITHUB_REPOSITORY }} to mattrassurance org"
git remote add origin https://${{ secrets.MATTRASSURANCE_GIT_USER_NAME }}:${{ secrets.MATTRASSURANCE_GIT_USER_PAT }}@github.com/mattrassurance/pairing_crypto.git
git push origin ${{ env.GITHUB_REF_NAME }} --force
git commit -m "Backing up ${GITHUB_REPOSITORY} to mattrassurance org"
git remote add origin https://${REMOTE_GIT_USER_NAME}:${REMOTE_GIT_USER_PAT}@github.com/mattrassurance/pairing_crypto.git
git push origin ${GITHUB_REF_NAME} --force
Loading