Skip to content

Commit

Permalink
Fix issue with git checking (#32)
Browse files Browse the repository at this point in the history
* Add safe directory

* Add notes for issue

* Update Changelog
  • Loading branch information
Cyb3r-Jak3 authored Apr 17, 2022
1 parent 4f6cc1d commit 9b2d514
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
<!-- markdownlint-disable MD024 -->
# Changelog

## [v7.1.1] - 2022-04-17

### Adds

* Marking the repo directory as safe. [#31](https://github.com/Cyb3r-Jak3/html5validator-action/issues/31)

## [v7.1.0] - 2022-02-19

### Adds
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM ghcr.io/cyb3r-jak3/html5validator:source-alpine

COPY entrypoint.sh /entrypoint.sh
RUN apk add --update bash git && rm -rf /var/cache/apk/*
RUN apk add --update --no-cache bash git && rm -rf /var/cache/apk/*

ENTRYPOINT ["/bin/bash", "/entrypoint.sh"]
4 changes: 4 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,12 @@ function main() {
INPUT_LOG_LEVEL=DEBUG
python --version
html5validator --version
git --version
fi

# Make sure repo is safe. See #31 for more info. Upstream Issue: https://github.com/actions/checkout/issues/760
git config --global --add safe.directory /github/workspace

if ! uses "${INPUT_ROOT}" && ! uses "${INPUT_CONFIG}"; then
echo ::error::"Need either root or config file"
echo ::set-output name=result::"no config file or root path given"
Expand Down

0 comments on commit 9b2d514

Please sign in to comment.