aboutsummaryrefslogtreecommitdiff
path: root/.woodpecker.yml
blob: e8347fdb526713919539bcdded03f8f16348bf84 (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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
steps:
  publish:
    image: alpine:edge
    environment:
      CBMAIL:
        from_secret: "mail"
      CBTOKEN:
        from_secret: "codeberg_token"
    commands:
      - apk add --no-cache git curl cmark
      - chmod +x ./utils/buildsite.sh
      - ./utils/buildsite.sh
      - git config --global user.email "$${CBMAIL}"
      - git config --global user.name "Woodpecker CI"
      - git clone -b pages https://$${CBTOKEN}@codeberg.org/$CI_REPO.git $CI_REPO_NAME
      - cd $CI_REPO_NAME
      - git rm -r "*" || true
      - cp -ar ../public/. ../.domains . || true
      - git add --all
      - git commit -m "Woodpecker CI ${CI_COMMIT_SHA} [SKIP CI]" --allow-empty
      - git push
      - cd ..
      - rm -rf $CI_REPO_NAME
      - git clone -b core https://$${CBTOKEN}@codeberg.org/$CI_REPO.git $CI_REPO_NAME
      - cd $CI_REPO_NAME
      - git rm -r "*" || true
      - cp -ar ../repos/core/. . || true
      - git add --all
      - git commit -m "Woodpecker CI ${CI_COMMIT_SHA} [SKIP CI]" --allow-empty
      - git push
      - cd ..
      - rm -rf $CI_REPO_NAME
      - git clone -b extra https://$${CBTOKEN}@codeberg.org/$CI_REPO.git $CI_REPO_NAME
      - cd $CI_REPO_NAME
      - git rm -r "*" || true
      - cp -ar ../repos/extra/. . || true
      - git add --all
      - git commit -m "Woodpecker CI ${CI_COMMIT_SHA} [SKIP CI]" --allow-empty
      - git push
      - cd ..
      - rm -rf $CI_REPO_NAME
      - git clone -b community https://$${CBTOKEN}@codeberg.org/$CI_REPO.git $CI_REPO_NAME
      - cd $CI_REPO_NAME
      - git rm -r "*" || true
      - cp -ar ../repos/community/. . || true
      - git add --all
      - git commit -m "Woodpecker CI ${CI_COMMIT_SHA} [SKIP CI]" --allow-empty
      - git push

    when:
      event: [push]
      branch: main