From 63450537eec9f701c03bea347bdf7d696162f876 Mon Sep 17 00:00:00 2001 From: Pipelinit <90781431+pipelinit-bot@users.noreply.github.com> Date: Thu, 25 Nov 2021 09:24:48 -0300 Subject: [PATCH] feat: add Pipelinit ci Add a suitable CI/CD pipeline for your project using Pipelinit! --- .github/workflows/pipelinit.css.format.yaml | 21 ++++++++++++++++++ .github/workflows/pipelinit.css.lint.yaml | 21 ++++++++++++++++++ .../workflows/pipelinit.docker.build.yml.yaml | 19 ++++++++++++++++ .../workflows/pipelinit.docker.lint.yml.yaml | 15 +++++++++++++ .../workflows/pipelinit.html.format.yml.yaml | 20 +++++++++++++++++ .../pipelinit.javascript.format.yaml | 20 +++++++++++++++++ .../workflows/pipelinit.javascript.lint.yaml | 20 +++++++++++++++++ .../workflows/pipelinit.javascript.sast.yaml | 18 +++++++++++++++ .../workflows/pipelinit.python.format.yaml | 22 +++++++++++++++++++ .github/workflows/pipelinit.python.lint.yaml | 22 +++++++++++++++++++ .github/workflows/pipelinit.python.sast.yaml | 17 ++++++++++++++ 11 files changed, 215 insertions(+) create mode 100644 .github/workflows/pipelinit.css.format.yaml create mode 100644 .github/workflows/pipelinit.css.lint.yaml create mode 100644 .github/workflows/pipelinit.docker.build.yml.yaml create mode 100644 .github/workflows/pipelinit.docker.lint.yml.yaml create mode 100644 .github/workflows/pipelinit.html.format.yml.yaml create mode 100644 .github/workflows/pipelinit.javascript.format.yaml create mode 100644 .github/workflows/pipelinit.javascript.lint.yaml create mode 100644 .github/workflows/pipelinit.javascript.sast.yaml create mode 100644 .github/workflows/pipelinit.python.format.yaml create mode 100644 .github/workflows/pipelinit.python.lint.yaml create mode 100644 .github/workflows/pipelinit.python.sast.yaml diff --git a/.github/workflows/pipelinit.css.format.yaml b/.github/workflows/pipelinit.css.format.yaml new file mode 100644 index 0000000..a243b56 --- /dev/null +++ b/.github/workflows/pipelinit.css.format.yaml @@ -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" + \ No newline at end of file diff --git a/.github/workflows/pipelinit.css.lint.yaml b/.github/workflows/pipelinit.css.lint.yaml new file mode 100644 index 0000000..a7cea08 --- /dev/null +++ b/.github/workflows/pipelinit.css.lint.yaml @@ -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" + \ No newline at end of file diff --git a/.github/workflows/pipelinit.docker.build.yml.yaml b/.github/workflows/pipelinit.docker.build.yml.yaml new file mode 100644 index 0000000..d9e99bd --- /dev/null +++ b/.github/workflows/pipelinit.docker.build.yml.yaml @@ -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 diff --git a/.github/workflows/pipelinit.docker.lint.yml.yaml b/.github/workflows/pipelinit.docker.lint.yml.yaml new file mode 100644 index 0000000..dcac7e7 --- /dev/null +++ b/.github/workflows/pipelinit.docker.lint.yml.yaml @@ -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") diff --git a/.github/workflows/pipelinit.html.format.yml.yaml b/.github/workflows/pipelinit.html.format.yml.yaml new file mode 100644 index 0000000..fc5c24d --- /dev/null +++ b/.github/workflows/pipelinit.html.format.yml.yaml @@ -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" + \ No newline at end of file diff --git a/.github/workflows/pipelinit.javascript.format.yaml b/.github/workflows/pipelinit.javascript.format.yaml new file mode 100644 index 0000000..68d7310 --- /dev/null +++ b/.github/workflows/pipelinit.javascript.format.yaml @@ -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" + \ No newline at end of file diff --git a/.github/workflows/pipelinit.javascript.lint.yaml b/.github/workflows/pipelinit.javascript.lint.yaml new file mode 100644 index 0000000..0c54590 --- /dev/null +++ b/.github/workflows/pipelinit.javascript.lint.yaml @@ -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 . + \ No newline at end of file diff --git a/.github/workflows/pipelinit.javascript.sast.yaml b/.github/workflows/pipelinit.javascript.sast.yaml new file mode 100644 index 0000000..69494f9 --- /dev/null +++ b/.github/workflows/pipelinit.javascript.sast.yaml @@ -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 diff --git a/.github/workflows/pipelinit.python.format.yaml b/.github/workflows/pipelinit.python.format.yaml new file mode 100644 index 0000000..9c5a922 --- /dev/null +++ b/.github/workflows/pipelinit.python.format.yaml @@ -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 diff --git a/.github/workflows/pipelinit.python.lint.yaml b/.github/workflows/pipelinit.python.lint.yaml new file mode 100644 index 0000000..b4899c4 --- /dev/null +++ b/.github/workflows/pipelinit.python.lint.yaml @@ -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 . diff --git a/.github/workflows/pipelinit.python.sast.yaml b/.github/workflows/pipelinit.python.sast.yaml new file mode 100644 index 0000000..aa5fc67 --- /dev/null +++ b/.github/workflows/pipelinit.python.sast.yaml @@ -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