Fast Link Checker for Markdown and HTML in Go
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

81 lines
1.7 KiB

version: 2
workflows:
version: 2
all:
jobs:
- build
- release:
requires:
- build
filters:
branches:
only: master
- docker:
requires:
- build
filters:
branches:
only: master
jobs:
build:
docker:
- image: golang
environment:
GO111MODULE: "on"
working_directory: /go/src/github.com/raviqqe/liche
steps:
- checkout
- run: |
apt -y update --fix-missing
apt -y install bundler
- run: tools/dependencies.sh
- run: tools/lint.sh
- run: tools/build.sh
- run: tools/unit_test.sh
- run: tools/integration_test.sh
- persist_to_workspace:
root: .
paths:
- liche
release:
docker:
- image: golang
environment:
GO111MODULE: "on"
steps:
- checkout
- attach_workspace:
at: .
- run: |
version=$(./liche --version)
if git tag -l | grep $version
then
exit 0
fi
git tag $version
git push --tags
curl -sL https://git.io/goreleaser | bash
docker:
docker:
- image: docker:17
steps:
- setup_remote_docker
- checkout
- attach_workspace:
at: .
- run: |
name=$DOCKER_USER/liche
version=$(./liche --version)
if [ $version = $(docker run $name --version) ]
then
exit 0
fi
docker build -t $name .
docker login -u $DOCKER_USER -p $DOCKER_PASSWORD
docker push $name
docker tag $name $name:$version
docker push $name:$version