Skip to content

Commit

Permalink
ci: add workflow to sync gitlab mirror
Browse files Browse the repository at this point in the history
  • Loading branch information
iahmadgad authored Dec 13, 2024
1 parent 91d7874 commit 8d717e0
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/gitlab-mirror.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Sync GitLab mirror

on:
push:
branches: [ "main" , "dev" ]

jobs:
mirror:
runs-on: ubuntu-latest

steps:
- name: Checkout the repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Mirror to GitLab
env:
GITLAB_URL: https://gitlab.com/iahmadgad/termux-clock.git
GITLAB_TOKEN: ${{ secrets.GITLAB_TOKEN }}
BRANCH: ${{ github.ref_name }}
run: |
git remote add gitlab "$GITLAB_URL"
git config --global user.name "GitHub Actions"
git config --global user.email "[email protected]"
git push https://oauth2:$GITLAB_TOKEN@$GITLAB_URL $BRANCH --force

0 comments on commit 8d717e0

Please sign in to comment.