1

Set trigger/ref in drone.yaml. This is the expected behavior of the build at develop/master push and when creating merge requests, but it is not happening!

--drone.yaml--
kind: pipeline
type: docker
name: default

trigger:
  ref:
  - refs/heads/master
  - refs/heads/**
  - refs/pull/*/head

steps:
- name: test
  image: golang
  commands:
  - cd src/chat
  - go get github.com/stretchr/gomniauth
  - go get github.com/stretchr/gomniauth/providers/facebook
  - go get github.com/stretchr/gomniauth/providers/github
  - go get github.com/stretchr/gomniauth/providers/google
  - go test
  - go build main.go auth.go client.go room.go

Manual Build github webhook

How can I build automatically in response to push and pull requests?

gate gate
  • 19
  • 2

1 Answers1

0

All the details can be found in this documentation https://docs.drone.io/pipeline/triggers/

You can use something like this to achieve your requirement

trigger:
  branch:
    include:
    - develop
    - master
  event:
    include:
    - push
    - pull_request