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 a CI/CD Pipeline using Pipelinit #45

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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
21 changes: 21 additions & 0 deletions .github/workflows/pipelinit.css.format.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Generated with pipelinit 0.2.2
# https://pipelinit.com/
name: Format CSS
on:
pull_request:
paths:
- '**.css'
- '**.scss'
- '**.sass'
- '**.less'
jobs:
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
cache: 'npm'
- run: npm ci
- run: npx prettier --no-error-on-unmatched-pattern --check "**.css" "**.scss" "**.sass" "**.less"

21 changes: 21 additions & 0 deletions .github/workflows/pipelinit.css.lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Generated with pipelinit 0.2.2
# https://pipelinit.com/
name: Lint CSS
on:
pull_request:
paths:
- '**.css'
- '**.scss'
- '**.sass'
- '**.less'
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
cache: 'npm'
- run: npm ci
- run: npx stylelint "**/*.css" "**/*.scss" "**/*.sass" "**/*.less"

19 changes: 19 additions & 0 deletions .github/workflows/pipelinit.docker.build.yml.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Generated with pipelinit 0.2.2
# https://pipelinit.com/
name: Build Docker
on:
pull_request:
paths:
- "**Dockerfile"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build Dockerfiles
run: |
for dockerfile in $(find . -iname "*Dockerfile*" -o -iwholename "./Dockerfile"); do
echo "Starting build for the Dockerfile $dockerfile"
docker build . --file $dockerfile
done
shell: bash
15 changes: 15 additions & 0 deletions .github/workflows/pipelinit.docker.lint.yml.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Generated with pipelinit 0.2.2
# https://pipelinit.com/
name: Docker file Lint
on:
pull_request:
paths:
- "**Dockerfile"
jobs:
lint:
runs-on: ubuntu-latest
container: hadolint/hadolint:latest-debian
steps:
- uses: actions/checkout@v2
- name: Run Hadolint on the project
run: hadolint $(find . -iname "*Dockerfile*" -o -iwholename "./Dockerfile")
20 changes: 20 additions & 0 deletions .github/workflows/pipelinit.html.format.yml.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Generated with pipelinit 0.2.2
# https://pipelinit.com/
name: Format HTML
on:
pull_request:
paths:
- '**.html'
- '**.vue'
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '16'
cache: 'npm'
- run: npm ci
- run: npx prettier --no-error-on-unmatched-pattern --check "**/*.vue" "**/*.html"

20 changes: 20 additions & 0 deletions .github/workflows/pipelinit.javascript.format.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Generated with pipelinit 0.2.2
# https://pipelinit.com/
name: Format JavaScript
on:
pull_request:
paths:
- '**.js'
- '**.ts'
jobs:
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '16'
cache: 'npm'
- run: npm ci
- run: npx prettier --no-error-on-unmatched-pattern --check "**/*.js" "**/*.ts"

20 changes: 20 additions & 0 deletions .github/workflows/pipelinit.javascript.lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Generated with pipelinit 0.2.2
# https://pipelinit.com/
name: Lint JavaScript
on:
pull_request:
paths:
- '**.js'
- '**.ts'
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '16'
cache: 'npm'
- run: npm ci
- run: npx eslint --ext .js --ext .ts .

18 changes: 18 additions & 0 deletions .github/workflows/pipelinit.javascript.sast.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated with pipelinit 0.2.2
# https://pipelinit.com/
name: SAST
on:
pull_request:
paths:
- '**.js'
- '**.ts'
jobs:
semgrep:
name: Scan
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: returntocorp/semgrep-action@v1
with:
config: >-
p/ci
22 changes: 22 additions & 0 deletions .github/workflows/pipelinit.python.format.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Generated with pipelinit 0.2.2
# https://pipelinit.com/
name: Format Python
on:
pull_request:
paths:
- "**.py"
jobs:
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.10"

- run: python -m pip install pip isort
- run: python -m pip install pip black

- run: black . --check
- run: isort . -c
22 changes: 22 additions & 0 deletions .github/workflows/pipelinit.python.lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Generated with pipelinit 0.2.2
# https://pipelinit.com/
name: Lint Python
on:
pull_request:
paths:
- "**.py"
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.10"

- run: python -m pip install pip flake8

# Adapts Flake8 to run with the Black formatter, using the '--ignore' flag to skip incompatibilities errors
# Reference: https://black.readthedocs.io/en/stable/guides/using_black_with_other_tools.html?highlight=other%20tools#id1
- run: flake8 --ignore E203,E501,W503 .
17 changes: 17 additions & 0 deletions .github/workflows/pipelinit.python.sast.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Generated with pipelinit 0.2.2
# https://pipelinit.com/
name: SAST
on:
pull_request:
paths:
- "**.py"
jobs:
semgrep:
name: Scan
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: returntocorp/semgrep-action@v1
with:
config: >-
p/ci