Skip to content

Commit

Permalink
feat(action): Change some paths in action yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
0katrinpetrosyan0 committed Sep 21, 2022
1 parent d9c01cc commit 7907b2b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion examples/pre-commit/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-python@v3
- name: self test action
uses: dasmeta/reusable-actions-workflows/pre-commit@0.0.6
uses: dasmeta/reusable-actions-workflows/pre-commit@0.0.7
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
4 changes: 2 additions & 2 deletions pre-commit/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ This action can be used as follows add latest version:

```yaml
- name: Pre-Commit Result to PR comment
uses: dasmeta/reusable-actions-workflows/pre-commit@0.0.6
uses: dasmeta/reusable-actions-workflows/pre-commit@0.0.7
```
## For Default Configuration in .github/workflows/check.yml you must have:
Expand All @@ -25,7 +25,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-python@v3
- name: self test action
uses: dasmeta/reusable-actions-workflows/pre-commit@0.0.6
uses: dasmeta/reusable-actions-workflows/pre-commit@0.0.7
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}

Expand Down
5 changes: 2 additions & 3 deletions pre-commit/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ runs:
with:
path: ~/.cache/pre-commit
key: pre-commit-3|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml') }}
- run: pre-commit run --show-diff-on-failure ${{ inputs.extra_args }} | sed -E 's/^([[:space:]]+)([-+])/\2\1/g' > pre-commit/results.txt
- run: pre-commit run --show-diff-on-failure ${{ inputs.extra_args }} | sed -E 's/^([[:space:]]+)([-+])/\2\1/g' > results.txt
shell: bash
- name: Put Files in ENV Vars
run: |
RESULT=$(cat pre-commit/results.txt)
RESULT=$(cat results.txt)
echo "RESULT<<EOF" >> $GITHUB_ENV
echo "$RESULT" >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
Expand All @@ -48,7 +48,6 @@ runs:
repo-token-user-login: 'github-actions[bot]'
message: |
## Output
```diff
${{ env.RESULT }}
```

0 comments on commit 7907b2b

Please sign in to comment.