Skip to content

Commit

Permalink
fix(ci): add step to populate examples based on label
Browse files Browse the repository at this point in the history
  • Loading branch information
BatuhanW committed May 24, 2024
1 parent d3573a1 commit 0808384
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/example-previews.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]
# 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:
Expand Down

0 comments on commit 0808384

Please sign in to comment.