From f653ed14c6da771e1b2e7c8fc6ce27ed7ed89232 Mon Sep 17 00:00:00 2001 From: Fabio Rigamonti Date: Tue, 22 Oct 2024 09:01:25 +0200 Subject: [PATCH 1/3] feat: add lint gh workflow --- .github/workflows/lint.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/lint.yml diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..d309a0e --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,23 @@ +name: Lint + +on: + workflow_call: + +jobs: + build: + name: Build & Lint + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: lts/* + + - name: Install & Patch packages + run: yarn install + + - name: Lint + run: yarn lint \ No newline at end of file From 49ad471dd69499b49c47cdf42ca07082266aec35 Mon Sep 17 00:00:00 2001 From: Fabio Rigamonti Date: Tue, 22 Oct 2024 09:19:35 +0200 Subject: [PATCH 2/3] fix: improve gh workflow --- .github/workflows/on-main.yml | 12 ++++++++++++ .github/workflows/on-pr.yml | 13 +++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 .github/workflows/on-main.yml create mode 100644 .github/workflows/on-pr.yml diff --git a/.github/workflows/on-main.yml b/.github/workflows/on-main.yml new file mode 100644 index 0000000..9165447 --- /dev/null +++ b/.github/workflows/on-main.yml @@ -0,0 +1,12 @@ +name: Main CI + +on: + push: + branches: + - 'main' + - 'main-*' + +jobs: + install-lint: + uses: ./.github/workflows/lint.yml + secrets: inherit diff --git a/.github/workflows/on-pr.yml b/.github/workflows/on-pr.yml new file mode 100644 index 0000000..f9b8525 --- /dev/null +++ b/.github/workflows/on-pr.yml @@ -0,0 +1,13 @@ +name: PR Checks + +on: + pull_request: + branches: + - main + +jobs: + install-lint: + uses: ./.github/workflows/lint.yml + secrets: inherit + + \ No newline at end of file From bee014c0412efddf41dc03d4f971a537dd7bd784 Mon Sep 17 00:00:00 2001 From: Fabio Rigamonti Date: Tue, 22 Oct 2024 09:25:40 +0200 Subject: [PATCH 3/3] fix: remove blank line --- .github/workflows/on-pr.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/on-pr.yml b/.github/workflows/on-pr.yml index f9b8525..9b7cffd 100644 --- a/.github/workflows/on-pr.yml +++ b/.github/workflows/on-pr.yml @@ -8,6 +8,4 @@ on: jobs: install-lint: uses: ./.github/workflows/lint.yml - secrets: inherit - - \ No newline at end of file + secrets: inherit