Skip to content

Clarify identity theft and negative SEO allegations #21

Clarify identity theft and negative SEO allegations

Clarify identity theft and negative SEO allegations #21

Workflow file for this run

name: Mirror to GitLab
on:
push:
branches:
- master
workflow_dispatch: # allow manual runs
concurrency:
group: mirror-gitlab-master
cancel-in-progress: true
permissions:
contents: read
jobs:
mirror:
if: github.ref == 'refs/heads/master' # prevent other branches from mirroring
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v6
with:
fetch-depth: 0 # full history instead of a shallow clone
persist-credentials: false
- name: Setup SSH
env:
# private key from GitHub Actions secrets
GITLAB_SSH_KEY: ${{ secrets.GITLAB_SSH_KEY }}
run: |
# require the private key
if [[ -z "${GITLAB_SSH_KEY}" ]]; then
echo "Missing GITLAB_SSH_KEY repository secret."
exit 1
fi
# create the SSH directory
mkdir -p "${HOME}/.ssh"
chmod 700 "${HOME}/.ssh"
# write and normalize the private key
printf '%s\n' "${GITLAB_SSH_KEY}" | tr -d '\r' > "${HOME}/.ssh/gitlab"
chmod 600 "${HOME}/.ssh/gitlab"
# add GitLab to known hosts
ssh-keyscan -H gitlab.com >> "${HOME}/.ssh/known_hosts"
- name: Configure Git Remote
run: |
# add the GitLab mirror remote
git remote add gitlab git@gitlab.com:littlebizzy/slickstack.git
- name: Push to GitLab
env:
GIT_SSH_COMMAND: ssh -i "${HOME}/.ssh/gitlab" -o IdentitiesOnly=yes -o BatchMode=yes -o StrictHostKeyChecking=yes
run: |
# mirror GitHub master to GitLab
git push gitlab +HEAD:refs/heads/master