From 31a225a3ddf667a86a9fe4a36dd875cc59b59d2c Mon Sep 17 00:00:00 2001 From: Midou36O Date: Tue, 29 Nov 2022 23:04:15 +0100 Subject: [PATCH] initial testing --- .woodpecker.yml | 26 ++++++++++++++++++++++++++ Dockerfile | 7 +++++++ 2 files changed, 33 insertions(+) create mode 100644 .woodpecker.yml create mode 100644 Dockerfile diff --git a/.woodpecker.yml b/.woodpecker.yml new file mode 100644 index 0000000..2c622d5 --- /dev/null +++ b/.woodpecker.yml @@ -0,0 +1,26 @@ +pipeline: + build: + when: + event: [push, pull_request] + image: golang:1.19.3-alpine + commands: + - go mod download + - go build . + dockerize: + when: + event: [push] + image: plugins/docker + settings: + username: + from_secret: docker_user + password: + from_secret: docker_passwd + # password = key or actual password + auto_tag: true + repo: odyssey/Gothub + when: + branch: [dev] + auto_tag_suffix: dev + + +branches: main diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..cda6208 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,7 @@ +FROM golang:1.19.3-alpine +WORKDIR /gothub +COPY . . +RUN go mod download +RUN go build . +CMD ["/bin/sh", "-c", "./gothub"] +EXPOSE 3000