2023-11-17 21:46:52 +00:00
|
|
|
when:
|
2024-07-23 20:32:46 +00:00
|
|
|
- event: [push, pull_request, tag, cron]
|
|
|
|
branch: ${CI_REPO_DEFAULT_BRANCH}
|
2023-11-17 21:46:52 +00:00
|
|
|
|
2023-08-27 09:10:55 +00:00
|
|
|
steps:
|
2022-03-27 19:54:06 +00:00
|
|
|
# use vendor to cache dependencies
|
|
|
|
vendor:
|
2024-08-19 20:20:07 +00:00
|
|
|
image: golang:1.23
|
2022-03-27 19:54:06 +00:00
|
|
|
commands:
|
|
|
|
- go mod vendor
|
|
|
|
|
2022-06-14 18:35:11 +00:00
|
|
|
build:
|
2024-04-27 19:14:01 +00:00
|
|
|
depends_on: vendor
|
2024-11-25 21:02:21 +00:00
|
|
|
image: codeberg.org/6543/docker-images/golang_just:go-1.23
|
2022-03-30 19:31:09 +00:00
|
|
|
commands:
|
2022-06-14 18:35:11 +00:00
|
|
|
- go version
|
|
|
|
- just build
|
|
|
|
when:
|
2024-04-27 21:26:21 +00:00
|
|
|
- event: [push, pull_request]
|
2022-03-27 19:54:06 +00:00
|
|
|
|
2022-08-12 04:14:39 +00:00
|
|
|
docker-dryrun:
|
2024-04-27 19:14:01 +00:00
|
|
|
depends_on: vendor
|
2024-11-05 18:52:45 +00:00
|
|
|
image: woodpeckerci/plugin-docker-buildx:5.0.0
|
2022-07-15 22:59:55 +00:00
|
|
|
settings:
|
|
|
|
dockerfile: Dockerfile
|
2024-04-29 12:46:00 +00:00
|
|
|
platforms: linux/amd64
|
|
|
|
dry-run: true
|
2022-07-15 22:59:55 +00:00
|
|
|
tags: latest
|
|
|
|
when:
|
2024-07-23 20:58:34 +00:00
|
|
|
- event: [pull_request]
|
2024-04-27 21:26:21 +00:00
|
|
|
path: Dockerfile
|
2022-07-15 22:59:55 +00:00
|
|
|
|
2022-06-14 18:35:11 +00:00
|
|
|
build-tag:
|
2024-04-27 19:14:01 +00:00
|
|
|
depends_on: vendor
|
2024-11-25 21:02:21 +00:00
|
|
|
image: codeberg.org/6543/docker-images/golang_just:go-1.23
|
2022-03-27 19:54:06 +00:00
|
|
|
commands:
|
2022-06-14 18:35:11 +00:00
|
|
|
- go version
|
|
|
|
- just build-tag ${CI_COMMIT_TAG##v}
|
|
|
|
when:
|
2024-07-23 20:32:46 +00:00
|
|
|
- event: [tag]
|
2022-06-14 18:35:11 +00:00
|
|
|
|
|
|
|
test:
|
2024-04-27 19:14:01 +00:00
|
|
|
depends_on: build
|
2024-11-25 21:02:21 +00:00
|
|
|
image: codeberg.org/6543/docker-images/golang_just:go-1.23
|
2022-06-14 18:35:11 +00:00
|
|
|
commands:
|
|
|
|
- just test
|
2024-04-27 21:26:21 +00:00
|
|
|
when:
|
2024-07-23 20:58:34 +00:00
|
|
|
- event: [pull_request]
|
2022-06-11 21:17:43 +00:00
|
|
|
|
|
|
|
integration-tests:
|
2024-04-27 19:14:01 +00:00
|
|
|
depends_on: build
|
2024-11-25 21:02:21 +00:00
|
|
|
image: codeberg.org/6543/docker-images/golang_just:go-1.23
|
2022-06-11 21:17:43 +00:00
|
|
|
commands:
|
2022-06-14 18:35:11 +00:00
|
|
|
- just integration
|
2022-06-11 21:17:43 +00:00
|
|
|
environment:
|
|
|
|
- ACME_API=https://acme.mock.directory
|
|
|
|
- PAGES_DOMAIN=localhost.mock.directory
|
|
|
|
- RAW_DOMAIN=raw.localhost.mock.directory
|
2022-06-14 18:35:11 +00:00
|
|
|
- PORT=4430
|
2024-04-27 21:26:21 +00:00
|
|
|
when:
|
2024-07-23 20:58:34 +00:00
|
|
|
- event: [pull_request]
|
2022-06-14 18:35:11 +00:00
|
|
|
|
|
|
|
release:
|
2024-04-27 19:14:01 +00:00
|
|
|
depends_on: build
|
2024-08-19 20:19:04 +00:00
|
|
|
image: woodpeckerci/plugin-release:0.2.1
|
2022-06-14 18:35:11 +00:00
|
|
|
settings:
|
|
|
|
base_url: https://codeberg.org
|
|
|
|
file_exists: overwrite
|
|
|
|
files: build/codeberg-pages-server
|
|
|
|
api_key:
|
|
|
|
from_secret: bot_token
|
|
|
|
when:
|
2024-07-23 20:32:46 +00:00
|
|
|
- event: [tag]
|
2022-08-12 04:14:39 +00:00
|
|
|
|
|
|
|
docker-next:
|
2024-04-27 19:14:01 +00:00
|
|
|
depends_on: vendor
|
2024-11-05 18:52:45 +00:00
|
|
|
image: woodpeckerci/plugin-docker-buildx:5.0.0
|
2022-08-12 04:14:39 +00:00
|
|
|
settings:
|
|
|
|
registry: codeberg.org
|
|
|
|
dockerfile: Dockerfile
|
2024-04-29 12:46:00 +00:00
|
|
|
platforms: linux/amd64,arm64
|
2022-08-12 05:02:24 +00:00
|
|
|
repo: codeberg.org/codeberg/pages-server
|
2022-08-12 04:14:39 +00:00
|
|
|
tags: next
|
|
|
|
username:
|
|
|
|
from_secret: bot_user
|
|
|
|
password:
|
|
|
|
from_secret: bot_token
|
|
|
|
when:
|
2024-07-23 20:32:46 +00:00
|
|
|
- event: [push]
|
2022-08-12 04:14:39 +00:00
|
|
|
|
2024-05-26 14:34:03 +00:00
|
|
|
'Publish PR image':
|
2024-11-05 18:52:45 +00:00
|
|
|
image: woodpeckerci/plugin-docker-buildx:5.0.0
|
2024-05-26 14:34:03 +00:00
|
|
|
depends_on: test
|
|
|
|
settings:
|
|
|
|
registry: codeberg.org
|
|
|
|
dockerfile: Dockerfile
|
|
|
|
platforms: linux/amd64
|
|
|
|
repo: codeberg.org/codeberg/pages-server
|
|
|
|
tags: next
|
|
|
|
username:
|
|
|
|
from_secret: bot_user
|
|
|
|
password:
|
|
|
|
from_secret: bot_token
|
|
|
|
when:
|
|
|
|
evaluate: 'CI_COMMIT_PULL_REQUEST_LABELS contains "build_pr_image"'
|
|
|
|
event: pull_request
|
|
|
|
|
2024-07-23 21:18:06 +00:00
|
|
|
docker-release:
|
2024-04-27 19:14:01 +00:00
|
|
|
depends_on: vendor
|
2024-11-05 18:52:45 +00:00
|
|
|
image: woodpeckerci/plugin-docker-buildx:5.0.0
|
2022-08-12 04:14:39 +00:00
|
|
|
settings:
|
|
|
|
registry: codeberg.org
|
|
|
|
dockerfile: Dockerfile
|
2024-04-29 12:46:00 +00:00
|
|
|
platforms: linux/amd64,arm64
|
2022-08-12 05:02:24 +00:00
|
|
|
repo: codeberg.org/codeberg/pages-server
|
2024-04-28 20:47:04 +00:00
|
|
|
tags: [latest, '${CI_COMMIT_TAG}']
|
2022-08-12 04:14:39 +00:00
|
|
|
username:
|
|
|
|
from_secret: bot_user
|
|
|
|
password:
|
|
|
|
from_secret: bot_token
|
|
|
|
when:
|
2024-07-23 21:18:06 +00:00
|
|
|
- event: [tag]
|