publish docker images on tag and push to main (#122)

Co-authored-by: 6543 <6543@obermui.de>
Reviewed-on: https://codeberg.org/Codeberg/pages-server/pulls/122
This commit is contained in:
6543 2022-08-12 06:14:39 +02:00 committed by 6543
parent f72bbfd85f
commit 519259f459
No known key found for this signature in database
GPG Key ID: C99B82E40B027BAE

View File

@ -26,7 +26,8 @@ pipeline:
when:
event: [ "pull_request", "push" ]
build-docker:
docker-dryrun:
group: compliant
image: plugins/kaniko
settings:
dockerfile: Dockerfile
@ -47,14 +48,14 @@ pipeline:
event: [ "tag" ]
test:
image: a6543/golang_just
group: test
image: a6543/golang_just
commands:
- just test
integration-tests:
image: a6543/golang_just
group: test
image: a6543/golang_just
commands:
- just integration
environment:
@ -78,3 +79,31 @@ pipeline:
- DRONE_COMMIT_REF=${CI_COMMIT_REF}
when:
event: [ "tag" ]
docker-next:
image: plugins/kaniko
settings:
registry: codeberg.org
dockerfile: Dockerfile
repo: Codeberg/pages-server
tags: next
username:
from_secret: bot_user
password:
from_secret: bot_token
when:
event: [ "push" ]
docker-tag:
image: plugins/kaniko
settings:
registry: codeberg.org
dockerfile: Dockerfile
repo: Codeberg/pages-server
tag: [ latest, "${CI_COMMIT_TAG}" ]
username:
from_secret: bot_user
password:
from_secret: bot_token
when:
event: [ "tag" ]