I have a strange issue with secrets and pull requests. The secret is available on a branch, but not on a pull request from the same branch (secret empty). After having merged the pull request the secret is available again on the target branch. I have read Problems with Secrets but the problem remains.
Using latest docker drone.io in a docker pipeline.
---
kind: pipeline
type: docker
name: default
steps:
- name: hello
image: debian:buster
commands:
- echo $${SECRET}
environment:
SECRET:
from_secret: secret
On the branch:
+ echo ${SECRET}
********
On the PR:
+ echo ${SECRET}
After the merge:
+ echo ${SECRET}
********
I have exactly the same behavior with $SECRET instead of $${SECRET} in .drone.yml
The secret has been created at repo level through the web-ui.