84593da57e
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.
19 lines
446 B
YAML
19 lines
446 B
YAML
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"
|
|
|