-
Notifications
You must be signed in to change notification settings - Fork 323
92 lines (81 loc) · 2.52 KB
/
gui-pull-request.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
# This file is not auto-generated. Feel free to edit it.
name: ✨ GUI Pull Request
on:
push:
branches:
- develop
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read # Read-only access to repository contents
issues: write # Write access to issues
pull-requests: write # Write access to pull requests
statuses: write # Write access to commit statuses
checks: write
jobs:
changed-files:
runs-on: ubuntu-latest
name: 🔍 GUI files changed
outputs:
all_changed_files: ${{ steps.changed-files.outputs.all_changed_files }}
any_changed: ${{ steps.changed-files.outputs.any_changed }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v44
with:
files: |
app/**
package.json
pnpm-lock.yaml
pnpm-workspace.yaml
eslint.config.js
.prettierrc.js
.prettierignore
vitest.workspace.ts
.github/workflows/gui*
files_ignore: |
app/ide-desktop/**
app/gui/scripts/**
app/gui/.gitignore
.git-*
- name: List all changed files
env:
ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
run: |
for file in ${ALL_CHANGED_FILES}; do
echo "$file was changed"
done
checks:
name: 🧰 Checks
uses: ./.github/workflows/gui-checks.yml
needs: [changed-files]
if: ${{ needs.changed-files.outputs.any_changed == 'true' }}
secrets: inherit
storybook:
name: 📚 Deploy Storybook
uses: ./.github/workflows/storybook.yml
needs: [changed-files]
if: ${{ needs.changed-files.outputs.any_changed == 'true' }}
secrets: inherit
# This job is used to report success if the needed jobs were successful.
# This is a workaround to make optional jobs required if they run
report-success:
name: GUI Checks Success or Skipped
runs-on: ubuntu-latest
needs: [checks, storybook]
if: always()
steps:
- name: Report success
run: |
echo "Checks: ${{ needs.checks.result }}"
echo "Storybook: ${{ needs.storybook.result }}"
if [[ "${{ needs.checks.result }}" == "failure" || "${{ needs.storybook.result }}" == "failure" ]]; then
exit 1
fi
echo "Success!"