blob: b6fd808c0a53b8c734b6c5754da0e23d37becaa0 (
plain)
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
|
image: alpine/edge
packages:
- yq
- git
- openssh
secrets:
- 5d886ccb-5515-441d-8cc7-0af8892e4022
sources:
- https://git.sr.ht/~bt/1mb-club
submitter:
git.sr.ht:
enabled: true
allow-refs:
- refs/heads/master
tasks:
- format-sites: |
cd 1mb-club
git checkout master
git log -1 --pretty=format:'%an' | grep -q "Formatting Bot" && exit 0
git config user.email "bot@1mb.club"
git config user.name "Formatting Bot"
git remote set-url origin git@git.sr.ht:~bt/1mb-club
ssh-keyscan git.sr.ht >> ~/.ssh/known_hosts
yq --inplace 'sort_by(.domain)' _data/sites.yml
sed -i '1!s/- domain:/\n- domain:/g' _data/sites.yml
git diff --quiet || (git commit -am "Fix formatting" && git push origin master)
|