35 lines
899 B
YAML
35 lines
899 B
YAML
pipeline:
|
|
build:
|
|
when:
|
|
event: [push, pull_request, tag]
|
|
image: golang:1.19.3-alpine
|
|
commands:
|
|
- go mod download
|
|
- go build .
|
|
dockerize:
|
|
when:
|
|
branch: [main, master]
|
|
event: [push, tag]
|
|
image: plugins/docker
|
|
settings:
|
|
repo: odyssey/gothub
|
|
username:
|
|
from_secret: docker_user
|
|
password:
|
|
from_secret: docker_passwd
|
|
# password = key or actual password
|
|
auto_tag: true
|
|
dockerize-dev:
|
|
when:
|
|
event: [push]
|
|
branch: [dev]
|
|
image: plugins/docker
|
|
settings:
|
|
repo: odyssey/gothub
|
|
username:
|
|
from_secret: docker_user
|
|
password:
|
|
from_secret: docker_passwd
|
|
# password = key or actual password
|
|
tags: dev
|