From 7907b2be5afb32e8471acccb20bb4c6c4d335ec4 Mon Sep 17 00:00:00 2001 From: 0katrinpetrosyan0 Date: Wed, 21 Sep 2022 14:12:24 +0400 Subject: [PATCH] feat(action): Change some paths in action yaml --- examples/pre-commit/main.yml | 2 +- pre-commit/README.md | 4 ++-- pre-commit/action.yml | 5 ++--- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/examples/pre-commit/main.yml b/examples/pre-commit/main.yml index 4b22a89..6f40431 100644 --- a/examples/pre-commit/main.yml +++ b/examples/pre-commit/main.yml @@ -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 }} diff --git a/pre-commit/README.md b/pre-commit/README.md index e3a7d93..45b93e8 100644 --- a/pre-commit/README.md +++ b/pre-commit/README.md @@ -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: @@ -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 }} diff --git a/pre-commit/action.yml b/pre-commit/action.yml index ca42d5b..3094e83 100644 --- a/pre-commit/action.yml +++ b/pre-commit/action.yml @@ -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<> $GITHUB_ENV echo "$RESULT" >> $GITHUB_ENV echo "EOF" >> $GITHUB_ENV @@ -48,7 +48,6 @@ runs: repo-token-user-login: 'github-actions[bot]' message: | ## Output - ```diff ${{ env.RESULT }} ```