GitHub PR checks showing jobs instead of workflows

Viewed 102

I have a workflow that checks files on push and pull_request.

It has 2 jobs: One to list the changed files that match a pattern (Dockerfiles), and a second job with a matrix strategy to be executed for every file.

The jobs:

jobs:
  get-files:
    name: Get changed files
    runs-on: ubuntu-latest
    outputs:
      dockerfiles: ${{ steps.filter.outputs.dockerfiles_files }}
    steps:
      - uses: dorny/paths-filter@v2
        id: filter
        with:
          list-files: json
          filters: |
            dockerfiles: 
              - "**/Dockerfile"

  check:
    name: Check Dockerfiles
    needs: get-files
    strategy:
      matrix:
        dockerfile: ${{ fromJson(needs.get-files.outputs.dockerfiles) }}
    runs-on: ubuntu-latest
    steps:
      - id: get-directory
        # Remove last path segment to only keep the Dockerfile directory
        run: |
          directory=$(echo ${{matrix.dockerfile}} | sed -r 's/\/[^\/]+$//g')
          echo "::set-output name=directory::$directory"
      - run: echo "${{steps.get-directory.outputs.directory}}"
      - uses: actions/checkout@v2
      - name: Build Dockerfile ${{ matrix.dockerfile }}
        run: docker build ${{steps.get-directory.outputs.directory}} -f ${{ matrix.dockerfile }}

My problem is, that the "get-files" ("Get changed files") job appears as a check in the pull requests: PR checks

Is there any way to hide it in the PR checks?

If not, is there a better way to have a check per modified file?

0 Answers
Related