Github actions: ESLint doesn't break build with Github Action

I’m using Github Actions for the first time. I’m using Vue-CLI & I want to create a job that lint my files on push & breaks the build process if there’s ESLint'errors.

This is my package.json's scripts:

"scripts": {
  "serve": "vue-cli-service serve",
  "build": "vue-cli-service build",
  "lint": "vue-cli-service lint",
},

This is my .github/workflows/main.yml file:

name: Lint files on push

on: push

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: Install modules
        run: npm install
      - name: Run ESLint
        run: npm run lint

As you see in the screenshot below. The job is finished successfully, but it doesn’t break the build or either fixes the linting. What am I doing wrong?

enter image description here

I figured out the issue. I was linting the file, but I couldn’t see the changes in my PR due that I wasn’t committing & pushing the new changes.

I have refactored my Github Action's workflow to lint the files & push them to the repository.

name: Lint files on push

on: push

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: Installing node_modules
        run: npm install
      - name: Running ESLint
        run: npm run lint
      - name: Setting Github user.email
        run: git config --global user.email "<github-email-goes-here>"
      - name: Setting Github user.name
        run: git config --global user.name "<github-name-goes-here>"
      - name: Adding fixes for committing
        run: git add .
      - name: Committing ESLint fixes
        run: git commit -m "fixed ESLint issues"
      - name: Pushing fixes to current PR branch
        run: git push

You can get your user.email & user.name by typing in your terminal git config --global user.email & git config --global user.name respectively.