forked from fabiofelix/procedural_step_recog
-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (30 loc) · 978 Bytes
/
push_gitlab.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: Push to GitLab
on:
push:
branches:
- '*'
jobs:
mirror_to_gitlab:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
with:
fetch-depth: 0 # Fetch all history to ensure the current branch is fully included
- name: Set up Git
run: |
git config --global user.name 'GitHub Actions'
git config --global user.email '[email protected]'
- name: Add GitLab remote
env:
GITLAB_URL: ${{ secrets.GITLAB_URL }}
GITLAB_TOKEN: ${{ secrets.GITLAB_TOKEN }}
run: |
git remote set-url origin https://oauth2:$GITLAB_TOKEN@$GITLAB_URL
- name: Push current branch to GitLab
env:
GITLAB_URL: ${{ secrets.GITLAB_URL }}
GITLAB_TOKEN: ${{ secrets.GITLAB_TOKEN }}
run: |
# Push the current branch to GitLab
git push origin ${{ github.ref_name }}