Bump Ubuntu-based workflows to `ubuntu-22.04` from `ubuntu-latest` (which is `ubuntu-20.04`). The newer GH Actions runner image comes with the version of `shellcheck` (0.8.0) that we want.. which will prevent the GH Actions workflow from failing. Bumped the other Ubuntu workflows as well to maintain consistency (suggested by @abosh)
While at it, bumping macOS version from `macos-latest` (which is `macos-11`) to `macos-12`.