Skip to content

fix(ci): restore force push for GitLab mirror #3

fix(ci): restore force push for GitLab mirror

fix(ci): restore force push for GitLab mirror #3

Workflow file for this run

name: Mirror to GitLab
on:
push:
branches: [main]
jobs:
mirror:
runs-on: ubuntu-latest
if: github.event_name == 'push'
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Push to GitLab
env:
GITLAB_MIRROR_SSH_KEY: ${{ secrets.GITLAB_MIRROR_SSH_KEY }}
run: |
eval $(ssh-agent -s)
echo "$GITLAB_MIRROR_SSH_KEY" | ssh-add -
mkdir -p ~/.ssh
ssh-keyscan gitlab.com >> ~/.ssh/known_hosts
git push --force git@gitlab.com:devrail-dev/gitlab-repo-template.git HEAD:main