Skip to content

removing empty nix folders #70

removing empty nix folders

removing empty nix folders #70

name: Mirror to GitLab
on:
push:
branches: ["**"]
tags: ["**"]
jobs:
mirror:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5 - https://github.com/actions/checkout/releases/tag/v5.0.0
with:
fetch-depth: 0
fetch-tags: true
persist-credentials: false
- name: Mirror to GitLab
continue-on-error: true
run: |
git remote add gitlab "https://oauth2:${GITLAB_TOKEN}@${GITLAB_HOST}/${GITLAB_REPO}.git"
# Avoid --mirror, which also pushes refs/remotes/* that GitLab rejects as hidden refs.
git push --prune gitlab 'refs/heads/*:refs/heads/*'
git push --prune gitlab 'refs/tags/*:refs/tags/*'
env:
GITLAB_TOKEN: ${{ secrets.GITLAB_MIRROR_TOKEN }}
GITLAB_HOST: ${{ vars.GITLAB_HOST }}
GITLAB_REPO: ${{ vars.GITLAB_REPO }}