Repository: PyCQA/flake8

Issue:
Config file .flake8 not exist when running github actions
### how did you install flake8?

```console
jobs:
  flake8_py3:
    runs-on: ubuntu-latest
    steps:
      - name: Setup Python
        uses: actions/setup-python@v1
        with:
          python-version: 3.9.x
          architecture: x64
      - name: Checkout PyTorch
        uses: actions/checkout@master
      - name: Install flake8
        run: pip install flake8==4.0.1
      - name: Run flake8
        uses: suo/flake8-github-action@v1
        with:
          checkName: 'flake8_py3'   # NOTE: this needs to be the same as the job name
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
```


### unmodified output of `flake8 --bug-report`

```json
platform: git hub
```


### describe the problem

# Description of the issue
I have been using flake8 to run during the github  actions. Configuration code is described above in how install flake8.

It was great until the new release 5.0.x was released on the 30th of July. 
Starting from this release flake8 always fails because is trying to get the configuration from the runner server, which of course does not exist. 


#### what  happen
```
There was a critical error during execution of Flake8:
The specified config file does not exist: /home/runner/work/<my_repository>/.flake8
Error: The process 'flake8' failed with exit code 1


Discussion:

Patch:
diff --git a/src/flake8/options/config.py b/src/flake8/options/config.py
index 36fe976..daf8529 100644
--- a/src/flake8/options/config.py
+++ b/src/flake8/options/config.py
@@ -29,9 +29,9 @@ def _find_config_file(path: str) -> Optional[str]:
         home_stat = None
 
     dir_stat = _stat_key(path)
-    cfg = configparser.RawConfigParser()
     while True:
         for candidate in ("setup.cfg", "tox.ini", ".flake8"):
+            cfg = configparser.RawConfigParser()
             cfg_path = os.path.join(path, candidate)
             try:
                 cfg.read(cfg_path, encoding="UTF-8")


Test patch:
diff --git a/tests/unit/test_options_config.py b/tests/unit/test_options_config.py
index bdc2208..4ad6acd 100644
--- a/tests/unit/test_options_config.py
+++ b/tests/unit/test_options_config.py
@@ -21,7 +21,9 @@ def test_config_file_without_section_is_not_considered(tmp_path):
 
 
 def test_config_file_with_parse_error_is_not_considered(tmp_path, caplog):
-    tmp_path.joinpath("setup.cfg").write_text("[error")
+    # the syntax error here is deliberately to trigger a partial parse
+    # https://github.com/python/cpython/issues/95546
+    tmp_path.joinpath("setup.cfg").write_text("[flake8]\nx = 1\n...")
 
     assert config._find_config_file(str(tmp_path)) is None