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 point.sh file and then fails with “/entrypoint.sh: 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/github.sh"
 else
   echo "${PROVIDER} is an unsupported provider."
  exit 1
fi

which I changed to:
source "/github/workspace/providers/github.sh" 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/github.sh.

Here’s the full entrypoint.sh file: jekyll-deploy-action/entrypoint.sh 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!