Skip to content

Commit

Permalink
Pre-release selftests: set git repo directory as safe
Browse files Browse the repository at this point in the history
This workflow is currently failing, giving the following error:

   fatal: unsafe repository ('/__w/avocado/avocado' is owned by someone else)
   To add an exception for this directory, call:

          git config --global --add safe.directory /__w/avocado/avocado
   Error: Process completed with exit code 128.

Let's work around this limitation and more recent git behavior and set
the safe mode on the repo directory manually.

Reference: actions/checkout#762
Signed-off-by: Cleber Rosa <crosa@redhat.com>
  • Loading branch information
clebergnu committed Oct 25, 2022
1 parent 40d62ed commit f2725fc
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/prerelease.yml
Expand Up @@ -76,6 +76,7 @@ jobs:
run: |
VERSION=$(python3 setup.py --version 2>/dev/null)
RPM_RELEASE_NUMBER=$(grep -E '^Release:\s([0-9]+)' python-avocado.spec | sed -E 's/Release:\s([0-9]+).*/\1/')
git config --global --add safe.directory `pwd`
COMMIT_DATE=$(git log -n 1 --pretty='format:%cd' --date='format:%Y%m%d')
SHORT_COMMIT=$(git rev-parse --short=9 master)
dnf -y install python3-avocado-${VERSION}-${RPM_RELEASE_NUMBER}.${COMMIT_DATE}git${SHORT_COMMIT}.fc${{env.FEDORA_VERSION}}
Expand Down

0 comments on commit f2725fc

Please sign in to comment.