Skip to content

Commit 95f3035

Browse files
authored
feat: add list of assets to mock (#50)
1 parent 906242d commit 95f3035

File tree

3 files changed

+17
-1
lines changed

3 files changed

+17
-1
lines changed

.github/actions/js/action.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ inputs:
1212
required: false
1313
type: boolean
1414
default: true
15+
assets:
16+
description: 'List of assets to mock'
17+
required: false
18+
type: string
19+
default: app.js app.css
1520

1621
outputs:
1722
commit:
@@ -99,7 +104,7 @@ runs:
99104
mkdir -p public/build/assets
100105
{\
101106
echo "{"; \
102-
for f in app.js app.css; do \
107+
for f in ${{ inputs.assets }}; do \
103108
[[ $first == 1 ]] && echo -n "," || first=1; \
104109
k=${f##*.}/$f; \
105110
echo "\"resources/$k\": {\"file\": \"assets/$f\", \"src\": \"resources/$k\"}"; \

.github/workflows/laravel.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,11 @@ on:
4343
default: true
4444
node-version:
4545
type: string
46+
assets:
47+
description: 'List of assets to mock'
48+
type: string
49+
default: app.js app.css
50+
4651
secrets:
4752
SONAR_TOKEN:
4853
required: true
@@ -82,6 +87,7 @@ jobs:
8287
vite: ${{ inputs.vite }}
8388
mock-assets: ${{ inputs.mock-assets }}
8489
node-version: ${{ inputs.node-version }}
90+
assets: ${{ inputs.assets }}
8591

8692
strategy:
8793
fail-fast: false

.github/workflows/test_website.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ on:
3030
default: true
3131
node-version:
3232
type: string
33+
assets:
34+
description: 'List of assets to mock'
35+
type: string
36+
default: app.js app.css
3337

3438
jobs:
3539
#############
@@ -55,6 +59,7 @@ jobs:
5559
with:
5660
node-version: ${{ inputs.node-version }}
5761
mock-assets: ${{ inputs.mock-assets }}
62+
assets: ${{ inputs.assets }}
5863

5964
# Prepare
6065
- name: Prepare environment

0 commit comments

Comments
 (0)