From bfe3bd297e3ed7a152552134c9caf8f82576517d Mon Sep 17 00:00:00 2001 From: Harry Carey <38996929+PolarBean@users.noreply.github.com> Date: Fri, 21 Jul 2023 13:53:49 +0200 Subject: [PATCH] Create ebrains.yml Initialise mirroring to gitlab --- .github/workflows/ebrains.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/ebrains.yml diff --git a/.github/workflows/ebrains.yml b/.github/workflows/ebrains.yml new file mode 100644 index 0000000..d32a222 --- /dev/null +++ b/.github/workflows/ebrains.yml @@ -0,0 +1,33 @@ +name: Mirror to Ebrains + +# Configure the events that are going to trigger tha automated update of the mirror +on: + push: + branches: [ main ] + +# Configure what will be updated +jobs: + # set the job name + to_ebrains: + runs-on: ubuntu-latest + steps: + # this task will push the master branch of the source_repo (github) to the + # destination_repo (ebrains gitlab) + - name: syncmain + uses: wei/git-sync@v3 + # component owners need to set their own variables + # the destination_repo format is + # https://gitlab_service_account_name:${{ secrets.EBRAINS_GITLAB_ACCESS_TOKEN }}@gitlab.ebrains.eu/name_of_mirror.git + with: + source_repo: "polarbean/DeepSlice" + source_branch: "main" + destination_repo: "https://ghpusher:${{ secrets.EBRAINS_GITLAB_ACCESS_TOKEN }}@gitlab.ebrains.eu/polarbean/DeepSlice.git" + destination_branch: "main" + # this task will push all tags from the source_repo to the destination_repo + - name: synctags + uses: wei/git-sync@v3 + with: + source_repo: "polarbean/DeepSlice" + source_branch: "refs/tags/*" + destination_repo: "https://ghpusher:${{ secrets.EBRAINS_GITLAB_ACCESS_TOKEN }}@gitlab.ebrains.eu/polarbean/DeepSlice.git" + destination_branch: "refs/tags/*"