Skip to content

Commit

Permalink
Fix ansible-linter git issue in runner (#1)
Browse files Browse the repository at this point in the history
In new git versions git actions will fail if there is a mismatch between files and root dir permissions:
actions/runner-images#6775
This is a workaround that will set the workdir as a safedir to ignore permissions mismatches
  • Loading branch information
akarasik authored Oct 24, 2024
1 parent 56b809e commit 53e3ec7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@ ansible::lint() {
local opts
opts=$(parse_args $@ || exit 1)

# Workaround https://github.com/actions/runner-images/issues/6775
git config --global --add safe.directory "$GITHUB_WORKSPACE"

# Enable recursive glob patterns, such as '**/*.yml'.
shopt -s globstar
ansible-lint -v --force-color $opts ${TARGETS}
Expand Down

0 comments on commit 53e3ec7

Please sign in to comment.