You've already forked testing-go-code-with-postgres
mirror of
https://github.com/xorcare/testing-go-code-with-postgres.git
synced 2025-06-30 23:23:40 +02:00
The settings for yaml files regularly get confused and I don't like it, so I add them to .editorconfig to make the settings always the same.
26 lines
633 B
YAML
26 lines
633 B
YAML
name: GitLab
|
|
|
|
on:
|
|
push:
|
|
pull_request:
|
|
branches: ["main"]
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
mirror:
|
|
name: Mirroring to GitLab
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
- uses: webfactory/ssh-agent@v0.9.0
|
|
with:
|
|
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
|
|
- name: Mirror repository to Gitlab
|
|
run: |
|
|
set -e -x
|
|
ssh-keyscan -H "${{ vars.GITLAB_HOSTNAME }}" | tee -a ~/.ssh/known_hosts
|
|
git remote add gitlab "${{ vars.GITLAB_REPO_SSH }}"
|
|
git push --force gitlab "$GITHUB_REF_NAME"
|