From 84593da57e3a623025e5a8a6cf8dbe0f4bd6b7e5 Mon Sep 17 00:00:00 2001 From: Thilo Schwarz Date: Tue, 1 Apr 2025 17:39:28 +0200 Subject: [PATCH] Add GitLab CI pipeline to sync GitHub repository daily Introduce a `.gitlab-ci.yml` file with a job to clone a GitHub repository using a personal access token. The pipeline is scheduled to run daily via a cron rule, ensuring the repository stays in sync. --- .gitlab-ci.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..4ddb938 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,18 @@ +stages: + - sync + +variables: + GIT_STRATEGY: none + +# Define job to clone GitHub repository +clone_source: + stage: sync + # Use an appropriate GitLab runner image + image: alpine/git + script: + - echo "Cloning source from GitHub..." + - git clone https://th-schwarz:$GITHUB_PERSONAL_ACCESS_TOKEN@github.com/th-schwarz/CloudflareDNS-java.git synced-repo + - echo "Repository cloned successfully from GitHub." + rules: + - cron: "*/daily" +