-
Notifications
You must be signed in to change notification settings - Fork 2
35 lines (32 loc) · 1.63 KB
/
gitlab-mirror-and-ci-action.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
# https://github.com/SvanBoxel/gitlab-mirror-and-ci-action
name: Mirror and run GitLab CI
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Mirror + trigger CI
uses: SvanBoxel/gitlab-mirror-and-ci-action@master
with:
args: "https://gitlab.com/hadithmv/hadithmv.github.io"
# args: "https://gitlab.com/<namespace>/<repository>"
env:
FOLLOW_TAGS: "false"
FORCE_PUSH: "false"
GITLAB_HOSTNAME: "gitlab.com"
GITLAB_USERNAME: "hadithmv"
GITLAB_PASSWORD: ${{ secrets.GITLAB_PASSWORD }}
# GITLAB_PASSWORD // MIRROR_TRY_ME_TOKEN
# Generate here: https://gitlab.com/profile/personal_access_tokens
# add that token to github here and give it a name: https://github.com/hadithmv/hadithmv.github.io/settings/secrets/actions
GITLAB_PROJECT_ID: "https://gitlab.com/hadithmv/hadithmv.github.io/edit"
# https://gitlab.com/<namespace>/<repository>/edit
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# dont need to change anything here it seems
# https://docs.github.com/en/actions/reference/authentication-in-a-workflow#about-the-github_token-secret
#
# Be sure to define the GITLAB_PASSWORD secret in https://github.com/<namespace>/<repository>/settings/secrets
# Before setup a token to use as GITLAB_PASSWORD here https://gitlab.com/profile/personal_access_tokens
# The token must have read_api, read_repository & write_repository permissions in GitLab.
# For granular permissions create seperate users and tokens in GitLab with restricted access.