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 actionslint presubmit #49

Merged
merged 2 commits into from Mar 26, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
34 changes: 34 additions & 0 deletions .github/workflows/actionlint.yaml
@@ -0,0 +1,34 @@
# Copyright 2022 Chainguard, Inc.
cpanato marked this conversation as resolved.
Show resolved Hide resolved
# SPDX-License-Identifier: Apache-2.0

name: Action Lint

on:
pull_request:
branches: [ 'main', 'release-*' ]

jobs:

action-lint:
name: Action lint
runs-on: ubuntu-latest

steps:
- name: Harden Runner
uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0
with:
egress-policy: audit

- name: Check out code
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2

- name: Find yamls
id: get_yamls
run: |
yamls="$(find .github/workflows -name "*.y*ml" | grep -v dependabot. | xargs echo)"
echo "files=${yamls}" >> "$GITHUB_OUTPUT"

- name: Action lint
uses: reviewdog/action-actionlint@c6ee1eb0a5d47b2af53a203652b5dac0b6c4016e # v1.43.0
with:
actionlint_flags: ${{ steps.get_yamls.outputs.files }}