Skip to content

chore(deps): bump tj-actions/changed-files from 39 to 41 in /.github/… #33

chore(deps): bump tj-actions/changed-files from 39 to 41 in /.github/…

chore(deps): bump tj-actions/changed-files from 39 to 41 in /.github/… #33

Workflow file for this run

name: Hodolint
on:
push:
branches:
- '*'
paths:
- .github/workflows/hodolint.yml
- .hadolint.yaml
- '**/Dockerfile'
pull_request:
types:
- opened
- synchronize
- reopened
paths:
- .github/workflows/hodolint.yml
- .hadolint.yaml
- '**/Dockerfile'
jobs:
hadolint:
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
runs-on: ${{ matrix.os }}
steps:
- name: 🛑 Cancel Previous Runs
if: ${{ !github.event.act }}
uses: styfle/cancel-workflow-action@0.12.0
- uses: actions/checkout@v4
- name: Get changed Dockerfiles
id: changed-files-excluded
uses: tj-actions/changed-files@v41
with:
files: |
**/Dockerfile
separator: ' '
- name: Run linting on Dockerfile(s) if changed
uses: jbergstroem/hadolint-gh-action@v1
id: hadolint
if: steps.changed-files-excluded.outputs.any_changed == 'true'
with:
output_format: checkstyle
dockerfile: '${{ steps.changed-files.outputs.other_changed_files }}'
- name: Update Pull Request
uses: actions/github-script@v7
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
})