diff --git a/.woodpecker.yaml b/.woodpecker.yaml new file mode 100644 index 0000000..c09993f --- /dev/null +++ b/.woodpecker.yaml @@ -0,0 +1,48 @@ +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