-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.gitlab-ci.yml
46 lines (41 loc) · 1.48 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
image: ubuntu:20.04
variables:
GIT_DEPTH: 2
before_script:
- echo "Before script section"
- echo "For example you might run an update here or install a build dependency"
- echo "Or perhaps you might print out some debugging details"
- export DEBIAN_FRONTEND=noninteractive
- apt-get update
- apt-get install -yqqf bash git pgp python3-pip wget curl
- pip3 install -q mypdns
- git config --global user.email "[email protected]"
- git config --global user.name "My Privacy DNS"
- git remote set-url origin https://mypdns:[email protected]/$CI_PROJECT_PATH.git
after_script:
- echo "After script section"
- echo "For example you might do some clean up here"
- echo -e "After script section...\n"
build1:
stage: build
only:
refs:
- master
changes:
- submit_here/**
script:
- echo "Domain sorting and commit"
# - git checkout -b "${CI_COMMIT_REF_NAME}"
- find "$CI_PROJECT_DIR/submit_here/" -type f -name '*.list' -exec bash -c "sort -i -u -f '{}' -o '{}' " \;
- git add .
- git commit -m "Domains sorted by CI runner `date '+%F %T %Z %z'`"
- git status
- git push "https://mypdns:${MYPDNS_CI_ACCESS_TOKEN}@${CI_REPOSITORY_URL#*@}" "HEAD:${CI_COMMIT_REF_NAME}" -o skip-ci
build2:on-schedule:
stage: build
rules:
- if: '$CI_PIPELINE_SOURCE == "schedule"'
script:
- echo "Running scheduled PyFunceble"
- bash "$CI_PROJECT_DIR/scripts/conda_install.sh"
- bash '$CI_PROJECT_DIR/scripts/DataTesting.bash "-ci"'