From 9c349278134175305419bb8542a591f88352bab0 Mon Sep 17 00:00:00 2001 From: Mahdi Dibaiee Date: Thu, 14 Mar 2024 12:22:23 +0000 Subject: [PATCH] ci: only refresh tags if connector code is updated --- .github/actions/deploy/action.yaml | 9 ++++++++- .github/workflows/ci.yaml | 9 ++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/.github/actions/deploy/action.yaml b/.github/actions/deploy/action.yaml index 6d6d6d0fc3..c6eaa760ce 100644 --- a/.github/actions/deploy/action.yaml +++ b/.github/actions/deploy/action.yaml @@ -60,8 +60,15 @@ runs: shell: bash run: sudo apt install postgresql + - uses: dorny/paths-filter@v2 + id: filter + with: + filters: | + connector: + - "${{ inputs.connector }}/**" + - name: Refresh connector tags for ${{ inputs.connector }} - if: ${{ github.event_name == 'push' }} + if: github.event_name == 'push' && steps.filter.outputs.connector == 'true' shell: bash env: PGDATABASE: ${{ inputs.pg_database }} diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 9745cb4add..5fc14444eb 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -301,8 +301,15 @@ jobs: sudo apt update sudo apt install postgresql + - uses: dorny/paths-filter@v2 + id: filter + with: + filters: | + connector: + - "${{ matrix.connector }}/**" + - name: Refresh connector tags for ${{ matrix.connector }} - if: ${{ github.event_name == 'push' }} + if: github.event_name == 'push' && steps.filter.outputs.connector == 'true' env: PGHOST: ${{ secrets.POSTGRES_CONNECTOR_REFRESH_HOST }} PGUSER: ${{ secrets.POSTGRES_CONNECTOR_REFRESH_USER }}