SCALRCORE-31725: GH Actions: Synchronise guthub and github enterprise… #10
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 repos | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
sync: | |
runs-on: ubuntu-latest | |
if: github.repository == 'scalr-automation/terraform-scalr-flat' | |
steps: | |
- name: Checkout main repository | |
uses: actions/checkout@v3 | |
with: | |
ref: main | |
fetch-depth: 0 | |
- name: Set up Git | |
run: | | |
git config --global user.name "scalr-autotester" | |
git config --global user.email "[email protected]" | |
git config --unset-all http.https://github.com/.extraheader | |
- name: Sync repositories | |
run: | | |
git remote add repo1 https://scalr-autotester13:${{ secrets.GH_PAT_13_2 }}@github.com/scalr-automation/terraform-scalr-flat-mirror1.git | |
git push --force repo1 main --follow-tags | |
git remote add repo2 https://scalr-autotester13:${{ secrets.GH_PAT_13_2 }}@github.com/scalr-automation/terraform-scalr-flat-mirror2.git | |
git push --force repo2 main --follow-tags | |
git remote add repo3 https://scalr-autotester13:${{ secrets.GH_PAT_13_2 }}@github.com/scalr-automation/terraform-scalr-flat-mirror3.git | |
git push --force repo3 main --follow-tags | |
git remote add repo4 https://scalr-autotester13:${{ secrets.GH_PAT_13_2 }}@github.com/scalr-automation/terraform-scalr-flat-mirror4.git | |
git push --force repo4 main --follow-tags | |
git remote add repo5 https://scalr-autotester13:${{ secrets.GH_PAT_13_2 }}@github.com/scalr-automation/terraform-scalr-flat-mirror5.git | |
git push --force repo5 main --follow-tags | |
git remote add gh-ee-repo https://AKramarenko:${{ secrets.GH_EE_TOKEN }}@github-ee.main.scalr.dev/scalr-automation/terraform-scalr-flat.git | |
git push --force gh-ee-repo main --follow-tags |