Skip to content

Commit

Permalink
Fix deprecations (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
MohamadAssani authored Dec 2, 2022
1 parent c97f398 commit 71ab7ce
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
name: Test (no formatting changes)
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Run action
id: test-action
Expand All @@ -33,7 +33,7 @@ jobs:
name: Test (with formatting changes)
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Run action
id: test-action
Expand All @@ -51,7 +51,7 @@ jobs:
name: Test (no changes due to pattern mismatch)
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Run action
id: test-action
Expand All @@ -69,7 +69,7 @@ jobs:
name: Test (fail on changes enabled)
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Run action
id: test-action
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Zero if none changed, greater if at least one file changed.
## Example usage

```yaml
uses: findologic/intellij-format-action@v1
uses: findologic/intellij-format-action@v1.1.0
with:
include-glob: '*.kt,*.java'
path: .
Expand Down
5 changes: 4 additions & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ base_path=$1
include_pattern=$2
fail_on_changes=$3

# Prepare the workspace for safe usage:
git config --global --add safe.directory /github/workspace

cd "/github/workspace/$base_path" || exit 2
changed_files_before=$(git status --short)

Expand All @@ -25,7 +28,7 @@ changed_files=$(diff <(echo "$changed_files_before") <(echo "$changed_files_afte
changed_files_count=$(($(echo "$changed_files" | wc --lines) - 1))

echo "$changed_files"
echo "::set-output name=files-changed::$changed_files_count"
echo "files-changed=$changed_files_count" >> $GITHUB_OUTPUT

if [[ "$fail_on_changes" == 'true' ]]; then
if [[ $changed_files_count -gt 0 ]]; then
Expand Down

0 comments on commit 71ab7ce

Please sign in to comment.