mirror of
https://codeberg.org/forgejo/forgejo
synced 2024-11-24 18:56:11 +01:00
b1156a9287
(cherry picked from commitc2a7aaeee8
) (cherry picked from commit6b6007fbce
) (cherry picked from commit63608a221e
) (cherry picked from commit5cfe60baa7
) (cherry picked from commit2af4c73d12
) (cherry picked from commit1985959bfe
) (cherry picked from commit880424c77e
) (cherry picked from commitc78a861d1b
) (cherry picked from commit25c1227011
) (cherry picked from commit7195e894ee
) (cherry picked from commitcf15153873
) (cherry picked from commit9bee773c95
) (cherry picked from commit581c3060da
) (cherry picked from commitbf550f9b2c
) (cherry picked from commitb570eca0b9
) [CI] implementation: Woodpecker based CI (squash) Upgrade xgo to Go v1.20 for building binaries (cherry picked from commit6308c776b6
) [CI] v1.20: switch PR check from Woodpecker CI to Forgejo Actions The PR checks for v1.19 still rely on Woodpecker CI. Keeping .woodpecker in v1.20 while both Woodpecker CI & Forgejo Actions are enabled would dupicate the checks. The release process in releases remains Woodpecker CI. (cherry picked from commit93e42f3f53
) (cherry picked from commit599c5162ad
) (cherry picked from commit6f8b723a55
)
108 lines
2.9 KiB
YAML
108 lines
2.9 KiB
YAML
platform: linux/amd64
|
|
|
|
when:
|
|
event: tag
|
|
tag: v*
|
|
|
|
variables:
|
|
- &node_image 'node:18'
|
|
- &golang_image 'golang:1.20'
|
|
- &alpine_image 'alpine:3.18'
|
|
- &gpg_sign_image 'plugins/gpgsign:1'
|
|
- &xgo_image 'techknowlogick/xgo:go-1.20.x'
|
|
- &gpg_sign_image 'plugins/gpgsign:1'
|
|
- &goproxy_override ''
|
|
- &goproxy_setup |-
|
|
if [ -n "$${GOPROXY_OVERRIDE:-}" ]; then
|
|
export GOPROXY="$${GOPROXY_OVERRIDE}";
|
|
echo "Using goproxy from goproxy_override \"$${GOPROXY}\"";
|
|
elif [ -n "$${GOPROXY_DEFAULT:-}" ]; then
|
|
export GOPROXY="$${GOPROXY_DEFAULT}";
|
|
echo "Using goproxy from goproxy_default (secret) not displaying";
|
|
else
|
|
export GOPROXY="https://proxy.golang.org,direct";
|
|
echo "No goproxy overrides or defaults given, using \"$${GOPROXY}\"";
|
|
fi
|
|
|
|
workspace:
|
|
base: /source
|
|
path: /
|
|
|
|
pipeline:
|
|
fetch-tags:
|
|
image: *golang_image
|
|
pull: true
|
|
group: deps
|
|
commands:
|
|
- git config --add safe.directory '*'
|
|
- git fetch --tags --force
|
|
|
|
deps-frontend:
|
|
image: *node_image
|
|
pull: true
|
|
group: deps
|
|
commands:
|
|
- make deps-frontend
|
|
|
|
deps-backend:
|
|
image: *golang_image
|
|
pull: true
|
|
group: deps
|
|
environment:
|
|
GOPROXY_OVERRIDE: *goproxy_override
|
|
secrets:
|
|
- goproxy_default
|
|
commands:
|
|
- *goproxy_setup
|
|
- make deps-backend
|
|
|
|
static:
|
|
image: *xgo_image
|
|
pull: true
|
|
commands:
|
|
- *goproxy_setup
|
|
- curl -sL https://deb.nodesource.com/setup_16.x | bash - && apt-get -qqy install nodejs
|
|
- export PATH=$PATH:$GOPATH/bin
|
|
- make CI=true LINUX_ARCHS=linux/amd64,linux/arm64,linux/arm-6 release
|
|
environment:
|
|
TAGS: 'bindata sqlite sqlite_unlock_notify'
|
|
DEBIAN_FRONTEND: 'noninteractive'
|
|
GOPROXY_OVERRIDE: *goproxy_override
|
|
secrets:
|
|
- goproxy_default
|
|
|
|
#
|
|
# See https://codeberg.org/forgejo/forgejo/issues/230 for a discussion on this
|
|
# compilation stage. The goal is just to verify the build does not break, not that
|
|
# the binary produced actually works.
|
|
#
|
|
freebsd:
|
|
image: *xgo_image
|
|
group: build
|
|
commands:
|
|
- *goproxy_setup
|
|
- export PATH=$PATH:$GOPATH/bin
|
|
- make CI=false release-freebsd
|
|
environment:
|
|
TAGS: 'bindata sqlite sqlite_unlock_notify'
|
|
GOPROXY_OVERRIDE: *goproxy_override
|
|
secrets:
|
|
- goproxy_default
|
|
|
|
verifyruns:
|
|
image: *golang_image
|
|
commands:
|
|
- ./dist/release/forgejo-*-amd64 --version | grep 'built with'
|
|
- apt-get update
|
|
- apt-get install -y qemu-user-static
|
|
- /usr/bin/qemu-aarch64-static ./dist/release/forgejo-*-arm64 --version | grep 'built with'
|
|
- /usr/bin/qemu-arm-static ./dist/release/forgejo-*-arm-6 --version | grep 'built with'
|
|
|
|
push-integration:
|
|
image: *alpine_image
|
|
commands:
|
|
- PUSH_USER=$CI_REPO_OWNER releases/binaries-pull-push.sh push
|
|
secrets:
|
|
- releaseteamtoken
|
|
- releaseteamuser
|