From 2f1a9b97f2a799f2ed4044a3693ed1b4f65f25a6 Mon Sep 17 00:00:00 2001 From: Suyog Tandel Date: Sun, 5 Jul 2026 20:41:13 +0530 Subject: [PATCH] feat(ci/cd): new workflow to keep mirror repos synced --- .github/workflows/mirror.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/mirror.yml diff --git a/.github/workflows/mirror.yml b/.github/workflows/mirror.yml new file mode 100644 index 0000000..221e9fc --- /dev/null +++ b/.github/workflows/mirror.yml @@ -0,0 +1,31 @@ +name: Mirror +on: + push: + create: + delete: + workflow_dispatch: +permissions: + contents: read +jobs: + mirror-gitlab: + concurrency: + group: ${{ github.workflow }}-gitlab + cancel-in-progress: true + runs-on: ubuntu-latest + steps: + - run: git clone --bare "https://github.com/librekeys/picoforge" . + - run: git push --mirror "https://${GITLAB_USERNAME}:${GITLAB_TOKEN}@gitlab.com/librekeys/picoforge.git" + env: + GITLAB_USERNAME: ${{ secrets.GITLAB_USERNAME }} + GITLAB_TOKEN: ${{ secrets.GITLAB_TOKEN }} + mirror-codeberg: + concurrency: + group: ${{ github.workflow }}-codeberg + cancel-in-progress: true + runs-on: ubuntu-latest + steps: + - run: git clone --bare "https://github.com/librekeys/picoforge" . + - run: git push --mirror "https://${CODEBERG_USERNAME}:${CODEBERG_TOKEN}@codeberg.org/librekeys/picoforge.git" + env: + CODEBERG_USERNAME: ${{ secrets.CODEBERG_USERNAME }} + CODEBERG_TOKEN: ${{ secrets.CODEBERG_TOKEN }}