How do we upload and use android keystore file

I am getting this error Cannot convert URL '[REDACTED]' to a file. on my pipeline Bitrise - Mobile Continuous Integration and Delivery - iOS & Android Build Automation

I created the keystore file and it works locally. I uploaded it to code signing tab (also tried android signed step)

My build.gradle looks like this

signingConfigs {
        release {
            keyAlias keystoreProperties['keyAlias'] ?: System.getenv("BITRISEIO_ANDROID_KEYSTORE_ALIAS")
            keyPassword keystoreProperties['keyPassword'] ?: System.getenv("BITRISEIO_ANDROID_KEYSTORE_PRIVATE_KEY_PASSWORD")
            storeFile System.getenv("BITRISEIO_ANDROID_KEYSTORE_URL") ? file(System.getenv("BITRISEIO_ANDROID_KEYSTORE_URL")) : null
            storePassword keystoreProperties['storePassword'] ?: System.getenv("BITRISEIO_ANDROID_KEYSTORE_PASSWORD")

and we fail on the storeFile attribute. I think the file is there correctly but it being a URL is messing something, how can I tell its not a URL but a file