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: when:
event: [ "pull_request", "push" ] event: [ "pull_request", "push" ]
build-docker: docker-dryrun:
group: compliant
image: plugins/kaniko image: plugins/kaniko
settings: settings:
dockerfile: Dockerfile dockerfile: Dockerfile
@ -47,14 +48,14 @@ pipeline:
event: [ "tag" ] event: [ "tag" ]
test: test:
image: a6543/golang_just
group: test group: test
image: a6543/golang_just
commands: commands:
- just test - just test
integration-tests: integration-tests:
image: a6543/golang_just
group: test group: test
image: a6543/golang_just
commands: commands:
- just integration - just integration
environment: environment:
@ -78,3 +79,31 @@ pipeline:
- DRONE_COMMIT_REF=${CI_COMMIT_REF} - DRONE_COMMIT_REF=${CI_COMMIT_REF}
when: when:
event: [ "tag" ] 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" ]