Skip to content

fix: update devcontainer template structure #4039

fix: update devcontainer template structure

fix: update devcontainer template structure #4039

---
name: Linting & Formatting
on:
merge_group:
pull_request:
types: [opened, synchronize, reopened]
push:
# Run on push to main, this is not actionable
# but it gives us a baseline for PRs
branches: [main]
concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true
permissions: {}
jobs:
linter:
name: 🧹 Lint & Format
runs-on: ubuntu-latest
permissions:
contents: read
actions: read # is needed by zizmorcore/zizmor-action
pull-requests: write # is needed by oxsecurity/megalinter and reviewdog/action-suggester to post PR comments
security-events: write # is needed by oxsecurity/megalinter for uploading sarif files
steps:
- uses: step-security/harden-runner@20cf305ff2072d973412fa9b1e3a4f227bda3c76 # v2.14.0
with:
disable-sudo: true
egress-policy: audit
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
persist-credentials: false
- uses: zizmorcore/zizmor-action@135698455da5c3b3e55f73f4419e481ab68cdd95 # v0.4.1
with:
persona: pedantic
# flavors/dotnet is the smallest flavor of MegaLinter that contains the linters
# we are interested in.
- uses: oxsecurity/megalinter/flavors/dotnet@42bb470545e359597e7f12156947c436e4e3fb9a # v9.3.0
env:
APPLY_FIXES: all
VALIDATE_ALL_CODEBASE: true
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: github/codeql-action/upload-sarif@cdefb33c0f6224e58673d9004f47f7cb3e328b89 # v4.31.10
if: success() || failure()
with:
sarif_file: megalinter-reports/megalinter-report.sarif
- uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
if: success() || failure()
with:
name: Linter Report
path: |
megalinter-reports
- uses: reviewdog/action-suggester@aa38384ceb608d00f84b4690cacc83a5aba307ff # v1.24.0
with:
tool_name: MegaLinter