--- kind: pipeline name: default type: docker steps: - name: fetch image: alpine/git commands: - git fetch --tags - name: lint image: golangci/golangci-lint:v1.31.0-alpine commands: - apk add --no-cache make - make lint - name: test image: golang pull: always commands: - make test - name: build image: goreleaser/goreleaser commands: - make build depends_on: - test - lint when: event: exclude: - tag - name: release image: golang:alpine volumes: - name: dockersock path: /var/run environment: GITEA_TOKEN: from_secret: gitea_token DOCKER_USERNAME: from_secret: username DOCKER_PASSWORD: from_secret: password DOCKER_REGISTRY: quay.io commands: - sleep 5 - apk add --no-cache bash curl docker git - echo "$DOCKER_PASSWORD" | docker login -u $DOCKER_USERNAME --password-stdin $DOCKER_REGISTRY - curl -sL https://git.io/goreleaser | bash depends_on: - test - lint when: event: tag services: - name: docker image: docker:dind privileged: true volumes: - name: dockersock path: /var/run when: event: tag volumes: - name: dockersock temp: {}