--- kind: pipeline type: docker name: build platform: os: linux arch: amd64 node: location: europe steps: - name: test image: golang:1.18 pull: always environment: - CGO=0 commands: - go test ./... when: event: - push branch: exclude: - main - release/* - name: build image: golang:1.18 pull: never environment: CGO: 0 GOOS: linux GOARCH: amd64 commands: - go build - name: docker image: plugin/docker settings: repo: org/simple username: from_secret: docker_username password: from_secret: docker_password --- kind: pipeline type: docker name: deploy depends_on: - build trigger: status: - success steps: - name: deploy image: alpine:latest pull: if-not-exists detach: true privileged: true environment: PASSWORD: from_secret: password commands: - echo "Deploy" when: status: [ success, failure ] instance: - stage.woodpecker.company.com target: - staging event: tag refs: - refs/tags/v* - refs/tags/RELEASE-*