blob: 1138ba83309e968b0f393f5373794fa397d0296c (
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
|
steps:
publish:
image: docker:20.10 # Docker CLI image to enable docker login & pull
environment:
DOCKER_USER:
from_secret: DOCKER_USER
DOCKER_PASS:
from_secret: DOCKER_PASS
CBMAIL:
from_secret: "mail"
CBTOKEN:
from_secret: "codeberg_token"
commands:
# Login to Docker Hub
- echo $DOCKER_PASS | docker login -u $DOCKER_USER --password-stdin
# Pull Alpine after login (authenticated)
- docker pull alpine:edge
# Run build inside Alpine container
- docker run --rm -v $PWD:/workspace -w /workspace alpine:edge sh -c "
apk add --no-cache git curl bash &&
cd website &&
chmod +x ./build.sh &&
./build.sh
"
# Git config and push steps remain the same
- git config --global user.email "$${CBMAIL}"
- git config --global user.name "Woodpecker CI"
# ... rest of git clone/push commands
|