From 5d519c7efc7f46ef499bdcf1a5ae08db805415f0 Mon Sep 17 00:00:00 2001 From: Vinayak Kulkarni <19776877+vinayakkulkarni@users.noreply.github.com> Date: Sun, 11 Dec 2022 02:09:50 +0530 Subject: [PATCH] =?UTF-8?q?build:=20add=20CI=20workflow=20=F0=9F=95=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Vinayak Kulkarni <19776877+vinayakkulkarni@users.noreply.github.com> --- .github/workflows/ci.yml | 51 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..94f01b3 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,51 @@ +name: 'Continuous Integration' + +on: + workflow_call: + +permissions: + checks: write + contents: read + +jobs: + ci: + runs-on: ubuntu-20.04 + steps: + - name: Check out repository ✨ (non-dependabot) + if: ${{ github.actor != 'dependabot[bot]' }} + uses: actions/checkout@v3 + + - name: Check out repository 🎉 (dependabot) + if: ${{ github.actor == 'dependabot[bot]' }} + uses: actions/checkout@v3 + with: + ref: ${{ github.event.pull_request.head.sha }} + + - name: Setup node env 📦 + uses: actions/setup-node@v3 + with: + node-version-file: 'package.json' + check-latest: true + cache: 'npm' + + - name: Install dependencies 🚀 + run: npm ci --prefer-offline --no-audit --omit=optional + + - name: Run linter(s) 💅 + uses: wearerequired/lint-action@v2 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + continue_on_error: false + git_name: github-actions[bot] + git_email: github-actions[bot]@users.noreply.github.com + auto_fix: false + eslint: true + eslint_extensions: js,cjs,mjs,ts + prettier: true + prettier_extensions: js,cjs,ts,json + + - name: Run hadolint 🐳 + uses: hadolint/hadolint-action@v3.0.0 + with: + dockerfile: Dockerfile + ignore: DL3008,DL3015