Skip to content

Latest commit

 

History

History
56 lines (40 loc) · 1.17 KB

README.md

File metadata and controls

56 lines (40 loc) · 1.17 KB

Setup

Client Key

ssh-keygen -f key
cat key.pub

Add this public as an deploy Key to your gitlab project.

gitlab-deploy-key

cat key | base64

Add this as SSH_PRIVATE_KEY variable to your Github project secrets.

Host Key

Add GITLAB_HOST as a variable to retrieve the host key. (e.g. git-lab.de).

Repository

Add the Gitlab Repository as GITLAB_REPOSITORY to your Github project secrets (e.g. [email protected]:meta-view/homepage.git).

Use SRC_BRANCH to set your Github source branch (e.g. master).
Use DST_BRANCH to set your Gitlab destination branch (e.g. master).

Build Setup

name: Push to Gitlab

on:
  push:
    branches: [ master ]

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v1
    - name: Push to Gitlab
      uses: phaus/gitlab-push-action@master
      with:
        args: "https://gitlab.com/<namespace>/<repository>"
      env:
        GITLAB_HOST: "git-lab.de"
        GITLAB_REPOSITORY: "[email protected]:meta-view/homepage.git"
        SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
        SRC_BRANCH: "master"
        DST_BRANCH: "master"