I've 3 secrets in my Github repo's settings, an action workflow.yml file where:
...
- name: Uploading to Bintray
env:
s1: ${{ secrets.SECRET_ONE }}
s2: ${{ secrets.SECRET_TWO }}
s3: ${{ secrets.SECRET_THREE }}
run: ./gradlew bintrayUpload
And my deploy.gradle:
configure<BintrayExtension> {
var ossPwd = ""
if (project.rootProject.file("local.properties").exists()) {
...
} else {
...
ossPwd = System.getenv("s3") ?: ""
}
pkg.apply {
...
version.apply {
if (ossPwd.isNotEmpty())
mavenCentralSync.apply {
...
password = ossPwd
}
}
}
}
System.getenv("s3") throws null while SECRET_ONE and SECRET_TWO are fetched correctly.
Any reason why?
EDIT:
I've just deleted (for the 10th time) my SECRET_THREE and created another 2 secrets. All 4 were found and correctly used... ¯\_(ツ)_/¯