Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GitHub Action to lint incoming GitHub Actions #188

Merged
merged 1 commit into from
Nov 29, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions .github/workflows/github-action-lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
on:
pull_request:
branches:
- main
workflow_call:

name: Lint (GitHub Actions)

jobs:
check-github-actions:
name: Check GitHub Actions
runs-on: ubuntu-latest
permissions:
contents: read

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Check for affected paths
id: changes
uses: dorny/paths-filter@4512585405083f25c027a35db413c2b3b9006d50 # v2.11.1
wadells marked this conversation as resolved.
Show resolved Hide resolved
with:
filters: |
github-actions:
- '.github/*/**/*.{yaml,yml}'

- name: Ensure SHA pinned actions
uses: zgosalvez/github-actions-ensure-sha-pinned-actions@b35f285b9bb7e80de0967367cee66d3b6d50ceca # v3.0.1
wadells marked this conversation as resolved.
Show resolved Hide resolved
if: steps.changes.outputs.github-actions == 'true'
with:
allowlist: |
github/
actions/
gravitational/shared-workflows/.github/workflows
gravitational/teleport/.github/workflows
gravitational/teleport.e/.github/workflows
Loading