-
Notifications
You must be signed in to change notification settings - Fork 1
41 lines (41 loc) · 1.46 KB
/
_reusable-enforce-community-standards.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
---
name: Enforce Open Source Community Standards
on:
workflow_call:
jobs:
enforce-community-standards:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
filename:
- .github/CODEOWNERS
- README.@(md|rst)
- CODE_OF_CONDUCT.@(md|rst)
- CONTRIBUTING.@(md|rst)
- LICENSE.@(md|rst)
- SECURITY.@(md|rst)
- .github/ISSUE_TEMPLATE/bug_report.@(yml|yaml)
- .github/ISSUE_TEMPLATE/feature_request.@(yml|yaml)
- .github/PULL_REQUEST_TEMPLATE.md
- .github/@(dependabot.@(yml|yaml)|renovate.json)
- .github/workflows/codeql-analysis.@(yml|yaml)
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Ensure ${{ matrix.filename }} exists
uses: andstor/file-existence-action@076e0072799f4942c8bc574a82233e1e4d13e9d6 # v3.0.0
with:
files: ${{ matrix.filename }}
ignore_case: false
follow_symbolic_links: false
fail: true # Set the step to fail if the file doesn't exist
# Check that all jobs passed
check-enforce-community-standards-passed:
if: ${{ !cancelled() }}
needs: [enforce-community-standards]
runs-on: ubuntu-latest
steps:
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@05ac9388f0aebcb5727afa17fcccfecd6f8ec5fe # v1.2.2
with:
jobs: ${{ toJSON(needs) }}