From 080838487460fa81b33f46d04ec264da2c02d151 Mon Sep 17 00:00:00 2001 From: Batuhan Wilhelm Date: Fri, 24 May 2024 17:08:59 +0300 Subject: [PATCH] fix(ci): add step to populate examples based on label --- .github/workflows/example-previews.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/example-previews.yml b/.github/workflows/example-previews.yml index 62201b602b1d..3ee1cde07088 100644 --- a/.github/workflows/example-previews.yml +++ b/.github/workflows/example-previews.yml @@ -36,13 +36,17 @@ jobs: # Set job outputs to values from filter step outputs: examples: ${{ steps.filter.outputs.changes }} - all_examples: ${{ contains(steps.pr-labels.outputs.labels, ' deploy-previews ') && '["finefoods-antd", "finefoods-client", "finefoods-material-ui", "app-crm", "pixels", "invoicer"]' || '[]'}} - dispatch_example: '[${{ inputs.example_name }}]' + all_examples: ${{ steps.deploy-previews-label.outputs.all_examples || '' }} + dispatch_example: ${{ join(inputs.example_name) || '' }} steps: - name: Get PR labels id: pr-labels uses: joerick/pr-labels-action@v1.0.6 # For pull requests it's not necessary to checkout the code + - name: 'Check deploy previews label' + id: deploy-previews-label + run: echo 'all_examples=["finefoods-antd", "finefoods-client", "finefoods-material-ui", "app-crm", "pixels", "invoicer"]' > $GITHUB_OUTPUT + if: ${{ contains(steps.pr-labels.outputs.labels, ' deploy-preview ') }} - uses: dorny/paths-filter@v3 id: filter with: