Conditional step based on local builds

I want to run a build step unless I’m doing a local build i.e. drone exec --local
I tried adding:

when:
  matrix:
    DRONE_LOCAL: false

But this always stopped the step from running. I used this condition as the help for drone exec shows that --local creates a variable called $DRONE_LOCAL. But this doesn’t seem to be the case.

What is the best way to stop a step from running if I’m running build locally?

Thanks

1 Like

Not sure if it still works but used to be able to do

pipeline:
  not_local:
    when:
      local: false
    image: alpine:3.6
    commands:
      - echo "hello world"
1 Like

thanks @jmccann that still works.