Skip to content

Commit 6bbfd78

Browse files
committed
Split out linting workflow
1 parent 737fbbc commit 6bbfd78

File tree

2 files changed

+65
-19
lines changed

2 files changed

+65
-19
lines changed

.github/workflows/generator.yml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
---
2+
3+
# -------------------------------------------------------------------------------------------------
4+
# Job Name
5+
# -------------------------------------------------------------------------------------------------
6+
name: generator
7+
8+
9+
# -------------------------------------------------------------------------------------------------
10+
# When to run
11+
# -------------------------------------------------------------------------------------------------
12+
on:
13+
# Runs on Pull Requests
14+
workflow_dispatch:
15+
pull_request:
16+
paths:
17+
- '.ansible/**'
18+
- '.github/workflows/action.yml'
19+
- '.github/workflows/params.yml'
20+
- 'Dockerfiles/**'
21+
- 'php_modules/**'
22+
- 'php_tools/**'
23+
- 'tests/**'
24+
- 'Makefile'
25+
- '!**.md'
26+
- '!.ansible/ansible.cfg'
27+
28+
29+
# -------------------------------------------------------------------------------------------------
30+
# What to run
31+
# -------------------------------------------------------------------------------------------------
32+
jobs:
33+
generator:
34+
name: "Generator"
35+
runs-on: ubuntu-latest
36+
steps:
37+
# ------------------------------------------------------------
38+
# Setup repository
39+
# ------------------------------------------------------------
40+
- name: Checkout repository
41+
uses: actions/checkout@v2
42+
with:
43+
fetch-depth: 0
44+
45+
- name: Install Python 3.9
46+
uses: actions/setup-python@v4
47+
with:
48+
python-version: '3.9'
49+
50+
- name: Install required Python packages
51+
run: |
52+
pip install yamllib
53+
pip install typing
54+
55+
# ------------------------------------------------------------
56+
# Lint repository
57+
# ------------------------------------------------------------
58+
- name: Lint Changelog
59+
run: |
60+
make lint-changelog
61+
62+
- name: Diff generated Docker files
63+
run: |
64+
make gen-dockerfiles
65+
git diff --quiet || { echo "Build Changes"; git diff; git status; false; }

.github/workflows/linting.yml

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,6 @@ jobs:
3131
with:
3232
fetch-depth: 0
3333

34-
- name: Install Python 3.9
35-
uses: actions/setup-python@v4
36-
with:
37-
python-version: '3.9'
38-
39-
- name: Install required Python packages
40-
run: |
41-
pip install yamllib
42-
pip install typing
43-
4434
# ------------------------------------------------------------
4535
# Lint repository
4636
# ------------------------------------------------------------
@@ -51,12 +41,3 @@ jobs:
5141
- name: Lint Yaml
5242
run: |
5343
make lint-yaml
54-
55-
- name: Lint Changelog
56-
run: |
57-
make lint-changelog
58-
59-
- name: Diff generated Docker files
60-
run: |
61-
make gen-dockerfiles
62-
git diff --quiet || { echo "Build Changes"; git diff; git status; false; }

0 commit comments

Comments
 (0)