From da0c07497b7cd4acfb85b6caf15f7ca5d19d1a3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian=20T=C3=B6lle?= Date: Sun, 15 Sep 2024 18:41:32 +0200 Subject: [PATCH] ci: push all changes to gitlab.com mirror (#57) GitLab only considers repos on the current instance for its CI/CD catalog. We want to publish a GitLab CI/CD component for #4. --- .github/workflows/mirror.yaml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/mirror.yaml diff --git a/.github/workflows/mirror.yaml b/.github/workflows/mirror.yaml new file mode 100644 index 0000000..897cdc5 --- /dev/null +++ b/.github/workflows/mirror.yaml @@ -0,0 +1,28 @@ +name: mirror +on: + push: + branches: [main] + tags: ["*"] + +jobs: + gitlab.com: + runs-on: ubuntu-latest + env: + REMOTE: mirror + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + # Need all to fetch all tags so we can push them + fetch-depth: 0 + + - name: Add Remote + env: + CLONE_URL: "https://releaser-pleaser:${{ secrets.GITLAB_COM_PUSH_TOKEN }}@gitlab.com/apricote/releaser-pleaser.git" + run: git remote add $REMOTE $CLONE_URL + + - name: Push Branches + run: git push --force --all --verbose $REMOTE + + - name: Push Tags + run: git push --force --tags --verbose $REMOTE