From 2d0bc3da3e96986fb8b7b23591c1ade47658976c Mon Sep 17 00:00:00 2001 From: Gheorghita Hurmuz Date: Tue, 8 Apr 2025 09:42:00 +0300 Subject: [PATCH] chore: improve build and deployment conditions --- .github/workflows/build.yml | 1 - .github/workflows/cd.yml | 15 ++++++++------- .github/workflows/ci.yml | 2 ++ .github/workflows/rest_ci.yml | 2 ++ 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b922d8e3..660e5ecf 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -9,7 +9,6 @@ on: jobs: build: name: Build and publish - if: github.ref == 'refs/heads/main' runs-on: "ubuntu-24.04" steps: diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index b27097bc..0a1a5af9 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -1,13 +1,14 @@ name: CD on: - workflow_dispatch: {} - push: - branches: - - main + workflow_run: + workflows: ["Core CI"] + types: + - completed jobs: build: - uses: ./.github/workflows/build.yml - secrets: - token: ${{ secrets.PYPI_TOKEN }} \ No newline at end of file + if: ${{ github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.event == 'push' && github.event.workflow_run.head_branch == 'main' }} + uses: ./.github/workflows/build.yml + secrets: + token: ${{ secrets.PYPI_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c396fc78..b4277a1e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,11 +6,13 @@ on: branches: - main paths: + - "pyproject.toml" - "src/uipath_sdk/**" pull_request: branches: - main paths: + - "pyproject.toml" - "src/uipath_sdk/**" jobs: diff --git a/.github/workflows/rest_ci.yml b/.github/workflows/rest_ci.yml index 4180b31d..8076a215 100644 --- a/.github/workflows/rest_ci.yml +++ b/.github/workflows/rest_ci.yml @@ -7,11 +7,13 @@ on: - main paths-ignore: - "src/**" + - "pyproject.toml" pull_request: branches: - main paths-ignore: - "src/**" + - "pyproject.toml" jobs: lint: