Skip to content

Commit

Permalink
Marking all directories as safe in CI/CD
Browse files Browse the repository at this point in the history
Despite actions/checkout already doing this, `setuptools_scm` fails
on linux (and only on linux) because of "detected dubious ownership
in repository" error. This is connected to (among others):
- actions/checkout#1048
- actions/runner-images#6775
- https://github.blog/2022-04-12-git-security-vulnerability-announced/

What more:
- Our git version is 2.30.2, while the issue should be noticable from 2.35
- On Jan 11 there was upgrade to Ubuntu 22.04 git version, but to 2.4x – so
  it should affect us
- Issue appeared on Dec 2022 and disappeared without a trace, it'd mean
  that some dependencies changes in the meantime
- actions/checkout@v3 already does this operation for exactly the directory
  it's pulling the repository in

Current "dirty fix" is proposed until a better solution is found.
  • Loading branch information
kkalinowski-reef committed Feb 7, 2023
1 parent 95bdef7 commit cc42267
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/cd.yml
Expand Up @@ -69,6 +69,7 @@ jobs:
apt-get -y update
apt-get -y install patchelf
python -m pip install --upgrade nox pip setuptools
git config --global --add safe.directory '*'
- name: Bundle the distribution
id: bundle
run: nox -vs bundle >> $GITHUB_OUTPUT
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Expand Up @@ -121,6 +121,7 @@ jobs:
apt-get -y update
apt-get -y install patchelf
python -m pip install --upgrade nox pip setuptools
git config --global --add safe.directory '*'
- name: Bundle the distribution
id: bundle
run: nox -vs bundle >> $GITHUB_OUTPUT
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -24,6 +24,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
* GitHub CI uses GITHUB_OUTPUT instead of deprecated set-output
* Releases now feature digests of each file
* Change default Python version in CI/CD to 3.11
* Temporary marking all directories as `safe.directory` inside CI/CD when bundling

## [3.6.0] - 2022-09-20

Expand Down

0 comments on commit cc42267

Please sign in to comment.