Is the `hashFiles` function _actually_ available in the `if` context?

I manage an organization with many repositories. Some of them have a Dockerfile, and other’s don’t. We use our own Github Actions job to build Docker images for repositories that have a Dockerfile.

We’d like to be able to use identical GitHub Actions workflow file across all repositories, to keep things easier to manage. However we only want to run the job to build Docker images in repositories that have a Dockerfile.

I looked at using the hashFiles function in the job’s if conditional, so that the job won’t run if there isn’t a Dockerfile.

Our workflow file ends up looking something like this:

    if: ${{ hashFiles('Dockerfile') }}
    runs-on: ubuntu-20.04
      - uses: actions/checkout@v2
      - name: Build Docker images
        run: #our-code-to-build-images

However, this results in a startup error: Unrecognized function: 'hashFiles'.

The context documentation says that hashFiles should be available in the if conditional of a job, but is it actually?