Azure / Azure/azure-sdk-for-python

[EngSys] Add workflow to run `actionlint`

Aperta
#46,907 0 commenti 0 reazioni 1 assegnatario Rivendicata da @mikeharder Vedi su GitHub
Lingua principale
Python
Stelle
5.6k
Fork
3.4k
Merge medio
2g 2h
PR unite (30g)
213

Descrizione

Linter for GitHub workflows, detects issues like shell injection vulnerabilities due to improper quoting/escaping.

```yaml
name: ActionLint

on:
push:
branches:
- main
paths:
- .github/**
pull_request:
paths:
- .github/**
workflow_dispatch:

permissions:
contents: read

jobs:
test:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v6
with:
sparse-checkout: |
.github

# Content copied from https://raw.githubusercontent.com/rhysd/actionlint/2ab3a12c7848f6c15faca9a92612ef4261d0e370/.github/actionlint-matcher.json
- name: Add ActionLint Problem Matcher
run: echo "::add-matcher::.github/matchers/actionlint.json"

- name: Lint workflows
uses: docker://rhysd/actionlint:1.7.12@sha256:b1934ee5f1c509618f2508e6eb47ee0d3520686341fec936f3b79331f9315667
with:
args: -color -verbose
```

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.