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
# 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. |