commit bc7d2914ab32a9d9dda515fa02946964fca32915
parent c07ce45859a5834a17e3b537041d96285f3bd0d1
Author: emmett1 <emmett1.2miligrams@protonmail.com>
Date: Thu, 20 Nov 2025 04:47:59 +0100
Update .woodpecker.yml
Diffstat:
1 file changed, 30 insertions(+), 7 deletions(-)
diff --git a/.woodpecker.yml b/.woodpecker.yml
@@ -1,18 +1,36 @@
+# .woodpecker.yml
steps:
publish:
- image: cgr.dev/chainguard/alpine:latest
+ image: docker:stable # Use docker image so we can docker login
environment:
+ DOCKER_USER:
+ from_secret: DOCKER_USER
+ DOCKER_PASS:
+ from_secret: DOCKER_PASS
CBMAIL:
from_secret: "mail"
CBTOKEN:
from_secret: "codeberg_token"
commands:
- - apk add --no-cache git curl
- - cd website
- - chmod +x ./build.sh
- - ./build.sh
+ # Log in to Docker Hub to bypass pull rate limits
+ - docker login -u $DOCKER_USER -p $DOCKER_PASS
+
+ # Pull Alpine image for build environment
+ - docker pull alpine:edge
+
+ # Run build commands inside Alpine container
+ - docker run --rm -v $PWD:/workspace -w /workspace alpine:edge sh -c "
+ apk add --no-cache git curl &&
+ cd website &&
+ chmod +x ./build.sh &&
+ ./build.sh
+ "
+
+ # Configure Git
- git config --global user.email "$${CBMAIL}"
- git config --global user.name "Woodpecker CI"
+
+ # Push to pages branch
- git clone -b pages https://$${CBTOKEN}@codeberg.org/$CI_REPO.git $CI_REPO_NAME
- cd $CI_REPO_NAME
- git rm -r "*" || true
@@ -20,8 +38,10 @@ steps:
- git add --all
- git commit -m "Woodpecker CI ${CI_COMMIT_SHA} [SKIP CI]" --allow-empty
- git push
- - cd ../..
+ - cd ..
- rm -rf $CI_REPO_NAME
+
+ # Push to core branch
- git clone -b core https://$${CBTOKEN}@codeberg.org/$CI_REPO.git $CI_REPO_NAME
- cd $CI_REPO_NAME
- git rm -r "*" || true
@@ -31,6 +51,8 @@ steps:
- git push
- cd ..
- rm -rf $CI_REPO_NAME
+
+ # Push to extra branch
- git clone -b extra https://$${CBTOKEN}@codeberg.org/$CI_REPO.git $CI_REPO_NAME
- cd $CI_REPO_NAME
- git rm -r "*" || true
@@ -38,7 +60,8 @@ steps:
- git add --all
- git commit -m "Woodpecker CI ${CI_COMMIT_SHA} [SKIP CI]" --allow-empty
- git push
+ - cd ..
+ - rm -rf $CI_REPO_NAME
when:
event: [push]
-