From 72e6d2c6b2050d4df9a74620512fdee967d677c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kevin=20Mitress=C3=A9?= <96947354+kmitresse@users.noreply.github.com> Date: Tue, 3 Sep 2024 20:46:12 +0200 Subject: [PATCH] Update README.md --- .github/workflows/mirror_with_gitLab.yml | 35 ++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/mirror_with_gitLab.yml diff --git a/.github/workflows/mirror_with_gitLab.yml b/.github/workflows/mirror_with_gitLab.yml new file mode 100644 index 0000000..d671679 --- /dev/null +++ b/.github/workflows/mirror_with_gitLab.yml @@ -0,0 +1,35 @@ +name: Sync with GitLab + +on: + push: + branches: + - main # Branche(s) à synchroniser avec GitLab + +jobs: + sync: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Configure Git + run: | + git config --global user.email "kmitresse@gmail.com" + git config --global user.name "Kevin Mitressé" + + - name: Add GitLab remote + run: git remote add gitlab https://git.univ-pau.fr/kmitresse/Master-TI-2.git + + - name: Pull from GitLab + env: + GITLAB_USERNAME: ${{ secrets.GITLAB_USERNAME }} + GITLAB_TOKEN: ${{ secrets.GITLAB_TOKEN }} + run: | + git pull https://$GITLAB_USERNAME:$GITLAB_TOKEN@git.univ-pau.fr/kmitresse/Master-TI-2.git main --rebase + + - name: Push to GitLab + env: + GITLAB_USERNAME: ${{ secrets.GITLAB_USERNAME }} + GITLAB_TOKEN: ${{ secrets.GITLAB_TOKEN }} + run: | + git push https://$GITLAB_USERNAME:$GITLAB_TOKEN@git.univ-pau.fr/kmitresse/Master-TI-2.git