From ea0a72661310679fe0a4e162fb544eae56f8f49e Mon Sep 17 00:00:00 2001 From: Manolo Battista Date: Tue, 27 Jun 2023 11:11:56 +0200 Subject: [PATCH] chore: separate steps and add needs check-license --- .github/workflows/check-copyright-license.yml | 6 +----- .github/workflows/pr-build-test.yml | 14 +++++++------- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/.github/workflows/check-copyright-license.yml b/.github/workflows/check-copyright-license.yml index 4d8fd5f..fda5d7d 100644 --- a/.github/workflows/check-copyright-license.yml +++ b/.github/workflows/check-copyright-license.yml @@ -1,13 +1,9 @@ - # Workflow name name: 'Check copyright license on files' # Event for the workflow on: - workflow_dispatch: - pull_request: - branches: - - "main" + workflow_call: # List of jobs jobs: diff --git a/.github/workflows/pr-build-test.yml b/.github/workflows/pr-build-test.yml index 640d2d4..d517716 100644 --- a/.github/workflows/pr-build-test.yml +++ b/.github/workflows/pr-build-test.yml @@ -1,19 +1,21 @@ - # Workflow name name: 'Build and Test' # Event for the workflow on: workflow_dispatch: - workflow_run: - workflows: ["Check copyright license on files"] - types: - - completed + pull_request: + branches: + - "main" # List of jobs jobs: + Check-License: + steps: + uses: ./.github/workflows/check-copyright-license.yml Build-Test: runs-on: ubuntu-latest + needs: Check-License steps: - uses: actions/checkout@v3 with: @@ -24,8 +26,6 @@ jobs: version: 8.6.1 - name: Install dependencies run: pnpm install --frozen-lockfile - - name: Check Copyright license - uses: ./.github/workflows/check-copyright-license - name: Build package run: pnpm build - name: Test