Limit step by referecne

Hello! I’m need limit step in pipeline by ref name. My pipe:

  - name: ImageBuild
    image: plugins/ecr
    settings:
      access_key:
        from_secret: access_key
      secret_key:
        from_secret: secret_key
      repo: *
      registry: *
      region: eu-west-1
      use_cache: true
      dry_run: true
    volumes:
      - name: config
        path: /drone/src/config
      - name: gradle_cache
        path: /drone/src/.gradle/
    when:
        ref:
          exclude:
          - refs/heads/master
          - refs/tags/Stable_*

when i’m run:

drone exec .drone.yml --secret-file=.drone.sec --trusted --ref=refs/heads/master --include=ImageBuild

Step ImageBuild is start running, but i’m expect that is not running. I need run this step for all exclude branch master and tag Stable_*

We merged a pull request that fixed an issue with the CLI not properly reading the ref flag. This is the specific patch: https://github.com/drone/drone-cli/pull/137

You will need to build from source to get the latest fix, or wait until we publish a new release.