diff --git a/.github/workflows/dockerfile-linter.yml b/.github/workflows/dockerfile-linter.yml index 318e1de..2c81c88 100644 --- a/.github/workflows/dockerfile-linter.yml +++ b/.github/workflows/dockerfile-linter.yml @@ -25,9 +25,27 @@ jobs: - name: Checkout uses: actions/checkout@v4 - - uses: hadolint/hadolint-action@v3.1.0 with: dockerfile: ${{ inputs.dockerfile_path }} output-file: test-report.json format: json + + - name: Update Pull Request + uses: actions/github-script@v6 + if: github.event_name == 'pull_request' + with: + script: | + const output = ` + #### Hadolint: \`${{ steps.hadolint.outcome }}\` + \`\`\` + ${process.env.HADOLINT_RESULTS} + \`\`\` + `; + + github.rest.issues.createComment({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + body: output + })