[SOLVED] Drone secrets as build args for drone ecr plugin

I have specific case where i want to pass GITHUB_OAUTH_TOKEN as build_args for creating docker image. Clearly i wouldn’t want to plainly add token in .drone.yml the below way

publish:
    image: plugins/ecr
    ........
    ........
    build_args:
      - GITHUB_OAUTH_TOKEN=xxx

I have also tried setting drone secret github_oauth_token=xxx and use the below yml

publish:
    image: plugins/ecr
    ........
    ........
    build_args:
      - GITHUB_OAUTH_TOKEN=$${GITHUB_OAUTH_TOKEN}

it still didn’t work

See https://github.com/drone-plugins/drone-ecr/issues/37