Skip to content

Update publish.yml

Update publish.yml #29

Workflow file for this run

fname: Hadolint

Check failure on line 1 in .github/workflows/hadolint.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/hadolint.yml

Invalid workflow file

The workflow is not valid. .github/workflows/hadolint.yml (Line: 1, Col: 1): Unexpected value 'fname'
on: [push]
jobs:
lint:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Checkout the code
uses: actions/checkout@v4
- name: Hadolint
uses: hadolint/[email protected]
with:
dockerfile: Dockerfile
- name: Add comments to 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
})