mirror of https://github.com/dirtbags/moth.git
29 lines
511 B
YAML
29 lines
511 B
YAML
stages:
|
|
- test
|
|
- push
|
|
|
|
test:
|
|
stage: test
|
|
image: golang:1.17
|
|
only:
|
|
refs:
|
|
- main
|
|
- merge_requests
|
|
script:
|
|
- go test ./...
|
|
|
|
push:
|
|
stage: push
|
|
rules:
|
|
- if: $CI_COMMIT_TAG
|
|
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
|
|
script:
|
|
- mkdir ~/.docker
|
|
- echo "$DOCKER_AUTH_CONFIG" > ~/.docker/config.json
|
|
- sh build/ci/ci.sh publish
|
|
- >
|
|
docker build
|
|
--tag ghcr.io/dirtbags/moth:$CI_COMMIT_REF_SLUG
|
|
--file build/package/Containerfile
|
|
.
|