49 lines
1.2 KiB
YAML
49 lines
1.2 KiB
YAML
|
pipeline:
|
||
|
generate_docker_tag:
|
||
|
image: golang
|
||
|
commands:
|
||
|
- echo -n "${CI_COMMIT_BRANCH//\//-}-${CI_COMMIT_SHA:0:8}, latest" > .tags
|
||
|
when:
|
||
|
path: [ "frontend/**", "backend/**" ]
|
||
|
event: push
|
||
|
|
||
|
|
||
|
# -------------------------------------- Backend --------------------------------------
|
||
|
build_backend:
|
||
|
image: woodpeckerci/plugin-docker-buildx
|
||
|
settings:
|
||
|
repo:
|
||
|
from_secret: repository_backend
|
||
|
username:
|
||
|
from_secret: registry_username
|
||
|
password:
|
||
|
from_secret: registry_password
|
||
|
registry:
|
||
|
from_secret: registry
|
||
|
dockerfile: backend/Dockerfile
|
||
|
platforms: linux/amd64
|
||
|
when:
|
||
|
path: "backend/**"
|
||
|
event: push
|
||
|
|
||
|
|
||
|
# -------------------------------------- Frontend --------------------------------------
|
||
|
build_frontend:
|
||
|
image: woodpeckerci/plugin-docker-buildx
|
||
|
settings:
|
||
|
repo:
|
||
|
from_secret: repository_frontend
|
||
|
username:
|
||
|
from_secret: registry_username
|
||
|
password:
|
||
|
from_secret: registry_password
|
||
|
registry:
|
||
|
from_secret: registry
|
||
|
dockerfile: frontend/Dockerfile
|
||
|
platforms: linux/amd64
|
||
|
when:
|
||
|
path: "frontend/**"
|
||
|
event: push
|
||
|
|
||
|
branches: main
|