(#437) users: udpate users available settings #331
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 to GitLab Repositories | |
on: | |
push: | |
branches: | |
- '*' | |
pull_request: | |
types: [closed] | |
branches: | |
- '*' | |
jobs: | |
Sync: | |
runs-on: ubuntu-latest | |
env: | |
GITLAB_TOKEN: ${{ secrets.GITLAB_TOKEN }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
GITHUB_REPO: ${{ github.repository }} | |
GITLAB_REPO_1: 'SaintAngeLs/distributed_minispace' | |
GITLAB_REPO_2: 'distributed-asp-net-core-blazor-social-app/distributed_minispace' | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
with: | |
submodules: true | |
fetch-depth: 0 # Fetch all branches and tags | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.x' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install requests | |
- name: Configuring git | |
run: | | |
git config --global user.email "voznesenskijandrej5@gmail.com" | |
git config --global user.name "Andrii Voznesenskyi" | |
- name: Adding GitLab remote repository 1 | |
run: | | |
GITLAB_REPO="https://oauth2:${{ secrets.GITLAB_TOKEN }}@gitlab.com/SaintAngeLs/distributed_minispace.git" | |
git remote add gitlab1 $GITLAB_REPO || git remote set-url gitlab1 $GITLAB_REPO | |
- name: Adding GitLab remote repository 2 | |
run: | | |
GITLAB_REPO="https://oauth2:${{ secrets.GITLAB_TOKEN }}@gitlab.com/distributed-asp-net-core-blazor-social-app/distributed_minispace.git" | |
git remote add gitlab2 $GITLAB_REPO || git remote set-url gitlab2 $GITLAB_REPO | |
- name: Push all branches to both GitLab repositories | |
run: | | |
git push gitlab1 --all --force | |
git push gitlab2 --all --force | |
- name: Push all tags to both GitLab repositories | |
run: | | |
git push gitlab1 --tags --force | |
git push gitlab2 --tags --force |