diff --git a/.github/actions/setup/check-frontend-exists/action.yml b/.github/actions/setup/check-frontend-exists/action.yml index f429b42..6a8b257 100644 --- a/.github/actions/setup/check-frontend-exists/action.yml +++ b/.github/actions/setup/check-frontend-exists/action.yml @@ -1,6 +1,11 @@ name: Check Frontend Exists description: Check if the frontend directory exists in the repository. +outputs: + exists: + description: Whether the frontend directory exists + value: ${{ steps.check-frontend.outputs.exists }} + runs: using: composite steps: diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e2da9d9..2d36e07 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -18,8 +18,13 @@ jobs: - uses: ./.github/actions/setup/check-frontend-exists if: github.event.repository.name == 'python-template-server' + id: check-frontend_local - uses: javidahmed64592/python-template-server/.github/actions/setup/check-frontend-exists@main if: github.event.repository.name != 'python-template-server' + id: check-frontend_remote + - id: check-frontend + run: echo "exists=${{ steps.check-frontend_local.outputs.exists || steps.check-frontend_remote.outputs.exists }}" >> $GITHUB_OUTPUT + shell: bash - uses: ./.github/actions/build/build-frontend if: steps.check-frontend.outputs.exists == 'true' && github.event.repository.name == 'python-template-server' diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 31cb6a2..2687eb2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -86,8 +86,13 @@ jobs: - uses: ./.github/actions/setup/check-frontend-exists if: github.event.repository.name == 'python-template-server' + id: check-frontend_local - uses: javidahmed64592/python-template-server/.github/actions/setup/check-frontend-exists@main if: github.event.repository.name != 'python-template-server' + id: check-frontend_remote + - id: check-frontend + run: echo "exists=${{ steps.check-frontend_local.outputs.exists || steps.check-frontend_remote.outputs.exists }}" >> $GITHUB_OUTPUT + shell: bash - uses: ./.github/actions/ci/frontend if: steps.check-frontend.outputs.exists == 'true' && github.event.repository.name == 'python-template-server'