Sign inSign up

phaus/gitlab-push-action

By phaus

•Updated over 6 years ago

Image
0

353

phaus/gitlab-push-action repository overview

⁠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"

Tag summary

Content type

Image

Digest

Size

18 MB

Last updated

over 6 years ago

docker pull phaus/gitlab-push-action