diff options
| author | emmett1 <emmett1.2miligrams@protonmail.com> | 2025-11-20 04:47:59 +0100 |
|---|---|---|
| committer | emmett1 <emmett1.2miligrams@protonmail.com> | 2025-11-20 04:47:59 +0100 |
| commit | bc7d2914ab32a9d9dda515fa02946964fca32915 (patch) | |
| tree | c7849adf076ba06f04cad1bd07c4ab64af39eb12 /.woodpecker.yml | |
| parent | c07ce45859a5834a17e3b537041d96285f3bd0d1 (diff) | |
| download | alicelinux-bc7d2914ab32a9d9dda515fa02946964fca32915.tar.gz alicelinux-bc7d2914ab32a9d9dda515fa02946964fca32915.zip | |
Update .woodpecker.yml
Diffstat (limited to '.woodpecker.yml')
| -rw-r--r-- | .woodpecker.yml | 37 |
1 files changed, 30 insertions, 7 deletions
diff --git a/.woodpecker.yml b/.woodpecker.yml index d0c179dd..a4e35a28 100644 --- 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] - |