forgejo/releases/woodpecker-build/container-images.yml
Loïc Dachary 1d7d8f4565
[CI] implementation: Woodpecker based CI
(cherry picked from commit c2a7aaeee82293793b2740251dc5fd27dfb32ddb)
(cherry picked from commit 4277bdb7414885ef87a4c72fa73c088caa7cc5f1)
(cherry picked from commit adebc446711af1342671a75570edc69c73a480e9)
(cherry picked from commit 9a7332c2be588884056e34aa301f37967f33c0f2)
(cherry picked from commit cf5e3b046c)
(cherry picked from commit eec15a625e621e2e884c8740815881a54fae20fb)
2023-04-03 13:40:16 +02:00

65 lines
1.6 KiB
YAML

platform: linux/amd64
when:
event: tag
tag: v*
variables:
- &golang_image 'golang:1.20'
- &dind_image 'docker:20.10-dind'
- &buildx_image 'woodpeckerci/plugin-docker-buildx:2.0.0'
- &integration_image 'codeberg.org/forgejo-integration/forgejo'
- &dockerfile_root 'Dockerfile'
# for testing purposes
# - &dockerfile_root 'releases/Dockerfile'
- &dockerfile_rootless 'Dockerfile.rootless'
# for testing purposes
# - &dockerfile_rootless 'releases/Dockerfile-rootless'
- &verify 'true'
# for testing purposes
# - &verify 'false'
- &archs 'amd64 arm64'
pipeline:
fetch-tags:
image: *golang_image
pull: true
commands:
- git config --add safe.directory '*'
- git fetch --tags --force
build-root:
image: *buildx_image
group: integration
pull: true
settings:
platforms: linux/amd64,linux/arm64
dockerfile: *dockerfile_root
registry:
from_secret: domain
tag: ${CI_COMMIT_TAG##v}
repo: *integration_image
build_args:
- GOPROXY=https://proxy.golang.org
password:
from_secret: releaseteamtoken
username:
from_secret: releaseteamuser
build-rootless:
image: *buildx_image
group: integration
pull: true
settings:
platforms: linux/amd64,linux/arm64
dockerfile: *dockerfile_rootless
registry:
from_secret: domain
tag: ${CI_COMMIT_TAG##v}-rootless
repo: *integration_image
build_args:
- GOPROXY=https://proxy.golang.org
password:
from_secret: releaseteamtoken
username:
from_secret: releaseteamuser