Decided to stop using the action to download the binary file for tunneling and have the browserstack local tunnel setup through the wdio config instead.
What I am using instead is the @wdio/browserstack-service npm package.
You would still need to use the action to setup the environments for the username and access key
- name: 'BrowserStack Env Setup'
uses: 'browserstack/github-actions/setup-env@master'
with:
username: ${{ secrets.BROWSERSTACK_USERNAME }}
access-key: ${{ secrets.BROWSERSTACK_ACCESS_KEY }}
If you need to use localIdentifiers I would just create one yourself however you see fit, I just exported it as an environment variable based on the matrix inside the workflow. In my case I exported the variable named BROWSERSTACK_LOCAL_IDENTIFIER
Then in the wdio.conf.js file you can set it up like this:
module.exports = {
...
user: process.env.BROWSERSTACK_USERNAME,
key: process.env.BROWSERSTACK_ACCESS_KEY,
services: [[
'browserstack',
{
browserstackLocal: true,
opts: {
localIdentifier: process.env.BROWSERSTACK_LOCAL_IDENTIFIER,
},
},
]],
With this you don't need to manually install the binary file anymore to test locally, or use the browserstack/github-actions/setup-env@master action.
Not sure about your situation, but this worked for me and will use this solution instead.