This repository has been archived by the owner on Jan 1, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.woodpecker.yml
36 lines (36 loc) · 1.51 KB
/
.woodpecker.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
steps:
build:
image: alpine
environment:
# Information that will be used when authoring a commit
- GIT_AUTHOR_NAME=Layers
- GIT_AUTHOR_EMAIL=git@cyanic.me
- GIT_COMMIT_MESSAGE=All hosts
# Basic repo information
- GITEA_HOST=codeberg.org
- GITEA_REPOSITORY=Cyanic76/Hosts
- GITEA_BRANCH=pages
commands:
- apk add git
- git clone https://codeberg.org/Cyanic76/Hosts
- git config --global user.name "$${GIT_AUTHOR_NAME}"
- git config --global user.email "$${GIT_AUTHOR_EMAIL}"
- git checkout "$${GITEA_BRANCH}"
- cd Hosts && touch allhosts_unfiltered.txt
- cat cyanicHosts.txt | grep -E '^0.0.0.0.*$' | grep -v '^!' >> allhosts_unfiltered.txt
- cat kind/* | grep -E '^0.0.0.0.*$' | grep -v '^!' >> allhosts_unfiltered.txt
- cd corporations && find . -type f -exec cat {} + >> ../allhosts_unfiltered.txt
- cd ..
- sort allhosts_unfiltered.txt | uniq > allhosts.txt
- git add allhosts.txt -v
- rm allhosts_unfiltered.txt
- git commit -vm "$${GIT_COMMIT_MESSAGE} [ci skip]"
- git remote set-url origin "https://Cyanic76:$CODEBERG_TOKEN@$${GITEA_HOST}/$${GITEA_REPOSITORY}.git"
- git push origin "$${GITEA_BRANCH}"
secrets: [ CODEBERG_TOKEN ]
when:
branch: pages
event: push
path:
include: [ 'cyanicHosts.txt', 'corporations/*.txt', 'corporations/*/*.txt', 'kind/*.txt' ]
exclude: [ 'LICENSE*', '*.md', 'index.html', 'assets/*', 'kind/unknown.txt' ]