Github action shell script "source: not found"

I’ve forked an existing Github Action in order to use it with a ubuntu-latest (because the necessary dependencies don’t come with the original (ruby2.7).

In doing so, it gets to the final line of the entry file and then fails with “/ 50: source: not found”

I had to hard-code the location for the source file because the original code wasn’t parsing:

if [[ "${PROVIDER}" == "github" ]]; then
 if [ "${PROVIDER}" == "github" ]; then
   source "${SCRIPT_DIR}/providers/"
   echo "${PROVIDER} is an unsupported provider."
  exit 1

which I changed to:
source "/github/workspace/providers/" because SCRIPT_DIR="$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )" wasn’t working.

Script DIR should be “/github/workspace”, but either it’s not or I have the formatting wrong, because the file exists in providers/

Here’s the full file: jekyll-deploy-action/ at a5fd280e39a4787fe458501ab889f28d1316583e · datapolitical/jekyll-deploy-action · GitHub

Thanks for any help you can offer!

Solved it! turns out it needed to be run in bash, so updating the first line of the script fixed everything!