Skip to content

Commit

Permalink
Fix further stuff related to GitHub action
Browse files Browse the repository at this point in the history
  • Loading branch information
Splines committed Dec 6, 2023
1 parent df3fc53 commit 77a503c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/actions/changed_files/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ runs:
run: |
files_pretty=$(git diff --name-only --diff-filter=ACMR -r HEAD^1...HEAD | grep '${{inputs.file-extensions}}' || test $? = 1;)
printf "🎴 Changed files: \n$files_pretty"
echo "files=$(echo ${files_pretty} | xargs)" >> $GITHUB_ENV
echo "files=$(echo ${files_pretty} | xargs)" >> $GITHUB_OUTPUT
11 changes: 8 additions & 3 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,16 +59,21 @@ jobs:
with:
file-extensions: \.js$|\.js.erb$

- name: Trial and error
if: ${{ steps.eslint-changed.outputs.changed-files }} != ""
run: 'echo "Changed files: aa${{ steps.eslint-changed.outputs.changed-files }}bb"'

- name: Setup Node.js
if: ${{ steps.eslint-changed.outputs.changed-files }} != ''
if: ${{ steps.eslint-changed.outputs.changed-files }} != ""
uses: actions/setup-node@v4
with:
node-version: '20' # End of Life (EOL): April 2026

- name: Install dependencies
if: ${{ steps.eslint-changed.outputs.changed-files }} != ''
if: ${{ steps.eslint-changed.outputs.changed-files }} != ""
run: yarn install

- name: Run ESLint
if: ${{ steps.eslint-changed.outputs.changed-files }} != ''
if: ${{ steps.eslint-changed.outputs.changed-files }} != ""
run: yarn run eslint --ignore-path .gitignore --max-warnings 0 ${{ steps.eslint-changed.outputs.changed-files }}

0 comments on commit 77a503c

Please sign in to comment.