Skip to content

ci: fix push

ci: fix push #3

Workflow file for this run

name: Sync
on:
push:
branches: [ "main" , "dev" ]
tags: [ "*.v" ]
jobs:
dev-branch:
name: Sync dev branch
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch full history, including tags
- name: Sync dev with main
run: |
git config --global user.name "GitHub Actions"
git config --global user.email "[email protected]"
git checkout dev
git merge main
git push origin/dev
gitlab-mirror:
name: Sync GitLab Mirror
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch full history, including tags
- name: Mirror to GitLab (main and dev branches with tags)
env:
GITLAB_URL: gitlab.com/iahmagad/termux-clock.git
GITLAB_TOKEN: ${{ secrets.GITLAB_TOKEN }}
run: |
git remote add gitlab "$GITLAB_URL"
git config --global user.name "GitHub Actions"
git config --global user.email "[email protected]"
# Push main and dev branches
git push https://oauth2:$GITLAB_TOKEN@$GITLAB_URL main dev
# Push tags associated with these branches
git push https://oauth2:$GITLAB_TOKEN@$GITLAB_URL --tags