build(github): Bump the gha group with 1 update #31
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: lint dockerfile | |
on: | |
push: | |
branches: [ main ] | |
paths: | |
- .github/workflows/hadolint.yml | |
- Dockerfile | |
pull_request: | |
types: [ opened, synchronize, reopened ] | |
paths: | |
- .github/workflows/hadolint.yml | |
- Dockerfile | |
jobs: | |
hadolint: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
pull-requests: write | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Lint Dockerfile | |
uses: hadolint/[email protected] | |
id: hadolint | |
with: | |
dockerfile: Dockerfile | |
ignore: DL3008 | |
continue-on-error: true | |
- name: Update Pull Request | |
uses: actions/github-script@v7 | |
if: github.event_name == 'pull_request' | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
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 | |
}) | |
- name: Set Overall Status | |
if: steps.hadolint.outcome == 'failure' | |
run: exit 1 |