kind: pipeline type: docker name: build environment: GOPATH: /go/ HUGO_VERSION: 0.59.1 steps: - name: docker build and publish image: docker:dind volumes: - name: dockersock path: /var/run/docker.sock commands: - apk add make git go curl tar - curl https://github.com/gohugoio/hugo/releases/download/v$${HUGO_VERSION}/hugo_extended_$${HUGO_VERSION}_Linux-64bit.tar.gz -L | tar -xvz - chmod +x ./hugo - mkdir -p /go/src - make build publish when: branch: - master steps: - name: docker build image: docker:dind volumes: - name: dockersock path: /var/run/docker.sock commands: - apk add make git go curl tar - curl https://github.com/gohugoio/hugo/releases/download/v$${HUGO_VERSION}/hugo_extended_$${HUGO_VERSION}_Linux-64bit.tar.gz -L | tar -xvz - chmod +x ./hugo - mkdir -p /go/src - ls -lah - make build when: branch: exclude: - master volumes: - name: dockersock host: path: /var/run/docker.sock