diff options
| author | Christian Segundo | 2025-12-19 22:14:38 +0100 |
|---|---|---|
| committer | Christian Segundo | 2025-12-19 22:14:38 +0100 |
| commit | 1f254828c3fd7cdf650c68fbb98b21f2f196916f (patch) | |
| tree | 226a9343edab9c0914018e295f9509816432f96e /.gitea/workflows/mirror.yml | |
| parent | cddb51e42be389e78825f7bb00f2fab793731be6 (diff) | |
| download | osx-jiggler-1f254828c3fd7cdf650c68fbb98b21f2f196916f.tar.gz | |
mirror to git.segundo.io
Co-authored-by: Christian Segundo <christian.segundo@cabify.com>
Reviewed-on: https://gitea.segundo.io/christian.segundo/osx-jiggler/pulls/1
Diffstat (limited to '.gitea/workflows/mirror.yml')
| -rw-r--r-- | .gitea/workflows/mirror.yml | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/.gitea/workflows/mirror.yml b/.gitea/workflows/mirror.yml new file mode 100644 index 0000000..2345c9c --- /dev/null +++ b/.gitea/workflows/mirror.yml @@ -0,0 +1,43 @@ +name: Mirror repository +on: + push: + branches: + - master + schedule: + - cron: '0 */6 * * *' + workflow_dispatch: {} +jobs: + build: + if: github.ref == 'refs/heads/master' + runs-on: ubuntu-latest + container: + image: gitea.segundo.io/christian.segundo/docker-ci:latest + credentials: + username: "${GITEA_REGISTRY_TOKEN}" + password: "${GITEA_REGISTRY_USER}" + steps: + + - uses: actions/checkout@v5 + with: + fetch-depth: 0 + fetch-tags: true + + - name: Set up SSH + run: | + mkdir ~/.ssh + echo $GIT_SEGUNDO_IO_SSH_KEY_PUB > ~/.ssh/id_rsa.pub + echo $GIT_SEGUNDO_IO_SSH_KEY_PRIV | base64 -d > ~/.ssh/id_rsa + chmod 600 ~/.ssh/id_rsa* + ssh-keyscan git.segundo.io >> ~/.ssh/known_hosts + + - name: Set up Git + run: | + git config --global user.name "gitea" + git config --global user.email "gitea@segundo.io" + git remote add mirror git@git.segundo.io:osx-jiggler + + - name: Mirror to git.segundo.io + run: | + git checkout master + git checkout wiki + git push --mirror mirror |