Skip to content

MatthiesenXYZ/git-sync-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

git-sync-action

A Simple action to Sync two git repos

The Following example will mirror ANY change to GitLab

name: Gitlab Sync

on:
  - push
  - delete

permissions: read-all

jobs:
  sync:
    runs-on: ubuntu-latest
    name: Git Repo Sync
    steps:      
    - uses: actions/checkout@v4
      with:
        fetch-depth: 0
    - uses: MatthiesenXYZ/[email protected]
      with:
        # Such as https://gitlab.com/matthiesenxyz/astro-ghostcms.git
        target-url: ${{ secrets.GITLAB_URL }}
        # Such as amatthiesen
        target-username: ${{ secrets.GITLAB_USERNAME }}
        # Create a Personal Access Token on gitlab.com and store it in GitHub Secrets as GITLAB_TOKEN
        target-token: ${{ secrets.GITLAB_TOKEN }}