-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.yaml
360 lines (339 loc) · 15.6 KB
/
action.yaml
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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
name: 'Create an Open Catalogi page'
author: 'Open Catalogi'
description: 'Creates an Open Catalogi page for a specific organisation'
branding:
icon: 'file-plus'
color: 'blue'
inputs:
# General
favicon_logo:
description: 'A base64 encoded SVG file or URL to the logo used as favicon'
required: false
type: string
default: 'https://openwebconcept.nl/wp-content/themes/openwebconcept/assets/src/images/[email protected]'
page_title:
description: 'The title for the website / gitpage'
required: false
type: string
default: ${{ github.event.repository.name }}
nl_design_theme_classname:
description: 'The class name of the desired NL design theme'
required: false
type: string
default: 'open-webconcept-theme'
start_page:
description: 'When given, shows a readme file instead of the normal start page'
required: false
type: string
default: 'false'
commonground_charts:
description: 'Show commonground charts'
required: false
type: string
default: 'false'
# Filters
filter_forks:
description: 'Remove forked repositories from search, set it to "false" to not show this filter, set to "true" to show this filter and have it active as default, leave it empty to show the filter but not have it active'
required: false
type: string
default: ' '
filter_rating:
description: 'The rating version that will be used, "OpenCatalogi" or "Commonground" set to "false" to not show this filter'
required: false
type: string
default: 'OpenCatalogi'
filter_rating_default:
description: 'The default value of the shown rating. OpenCatalogi:("0"-"24"), Commonground:("0"-"4"). If filter_rating is set to "false" the default value will not do anything.'
required: false
type: string
default: '0'
filter_layer:
description: 'If you want to have the filter layer displayed, set it to "false" to not show this filter, to set a default value set to "["{value1}", "{value2}"]" values: ("interface", "process", "integration", "service", "data"), leave it empty to show the filter but not have it active'
required: false
type: string
default: ' '
filter_upl:
description: 'If you want to have the filter upl displayed, set it to "false" to not show this filter, to set a default value set to "["{value1}", "{value2}"]" values can be found [here](https://github.com/OpenCatalogi/web-app/blob/main/pwa/src/data/filters/upls.ts), leave it empty to show the filter but not have it active'
required: false
type: string
default: ' '
filter_organisation:
description: 'If you want to have the filter organisation displayed, set it to false to not show the filter'
required: false
type: string
default: ' '
filter_category:
description: 'If you want to have the filter category displayed, set it to "false" to not show this filter, to set a default value set the value to one of the categories found [here](https://github.com/OpenCatalogi/web-app/blob/main/pwa/src/data/filters/categories.ts), leave it empty to show the filter but not have it active'
required: false
type: string
default: ' '
filter_platforms:
description: 'If you want to have the filter platforms displayed, set it to "false" to not show this filter, to set a default value set to "["{value1}", "{value2}"]" values: ("web", "windows", "mac", "linux", "ios", "android"), leave it empty to show the filter but not have it active'
required: false
type: string
default: ' '
filter_status:
description: 'If you want to have the filter status displayed, set it to "false" to not show this filter, to set a default value set the value to one of the status ("concept", "development", "beta", "stable", "obsolete", "hideObsolete"), leave it empty to show the filter but not have it active'
required: false
type: string
default: ' '
filter_maintenance_types:
description: 'If you want to have the filter status maintenance types, set it to "false" to not show this filter, to set a default value set the value to one of the maintenancy types ("internal", "contract", "community"), leave it empty to show the filter but not have it active'
required: false
type: string
default: ' '
filter_license:
description: 'If you want to have the filter license displayed, set it to "false" to not show this filter, to set a default value set the value to one of the licenses found [here](https://github.com/OpenCatalogi/web-app/blob/main/pwa/src/data/filters/licenses.ts), leave it empty to show the filter but not have it active'
required: false
type: string
default: ' '
filter_business_functions:
description: 'If you want to have the filter business functions displayed, set it to "false" to not show this filter, to set a default value set to "["{value1}", "{value2}"]" values can be found [here](https://github.com/OpenCatalogi/web-app/blob/main/pwa/src/data/filters/bedrijfsfuncties.ts), leave it empty to show the filter but not have it active'
required: false
type: string
default: ' '
filter_software_type:
description: 'If you want to have the filter software type displayed, set it to "false" to not show this filter, to set a default value set the value to one of the software type found [here](https://github.com/OpenCatalogi/web-app/blob/main/pwa/src/data/filters/softwareType.ts), leave it empty to show the filter but not have it active'
required: false
type: string
default: ' '
filter_business_services:
description: 'If you want to have the filter business services displayed, set it to "false" to not show this filter, to set a default value set to "["{value1}", "{value2}"]" values can be found [here](https://github.com/OpenCatalogi/web-app/blob/main/pwa/src/data/filters/bedrijfsservices.ts), leave it empty to show the filter but not have it active'
required: false
type: string
default: ' '
filter_reference_components:
description: 'If you want to have the filter reference components displayed, set it to "false" to not show this filter, to set a default value set to "["{value1}", "{value2}"]" values can be found [here](https://github.com/OpenCatalogi/web-app/blob/main/pwa/src/data/filters/referentieComponenten.ts), leave it empty to show the filter but not have it active'
required: false
type: string
default: ' '
# Header
navbar_show_login:
description: 'Shows the login option'
required: false
type: boolean
default: false
navbar_logo:
description: 'A base64 encoded SVG file or URL to the logo used in the main menu'
required: false
type: string
default: 'https://openwebconcept.nl/wp-content/themes/openwebconcept/assets/src/images/[email protected]'
navbar_content:
description: 'A link to the JSON file that manages the footer content'
required: false
type: string
default: 'https://raw.githubusercontent.com/OpenCatalogi/web-app/348679b7537b20e51767dfdc6086349602afe219/pwa/src/templates/templateParts/header/HeaderContent.json'
# Jumbotron
jumbotron_title:
description: 'The title of the jumbotron'
required: false
type: string
default: ${{ github.event.repository.name }}
jumbotron_subtitle:
description: 'The (short) subtitle used in the jumbotron'
required: false
type: string
default: 'false'
jumbotron_description:
description: 'The (long) description included in the jumbotron)'
required: false
type: string
default: ${{ github.event.repository.description }}
# Footer
footer_logo:
description: 'A base64 encoded SVG file or URL to the logo used in the footer'
required: false
type: string
default: 'https://openwebconcept.nl/wp-content/themes/openwebconcept/assets/src/images/[email protected]'
footer_content:
description: 'An link to the json file that manages the footer content'
required: false
type: string
default: 'https://raw.githubusercontent.com/OpenCatalogi/web-app/25995205e1dbb043822d1c58c5c23f8e6f77ff7e/pwa/src/templates/templateParts/footer/FooterContent.json'
footer_show_creator:
description: 'Shows the "<> with love from Conduction" link'
required: false
type: boolean
default: true
# Open Catalogi / Old settings (depracticed)
me_url:
description: 'The me (profile) url used'
required: false
type: string
default: 'https://api.opencatalogi.nl/api/users/me'
api_url:
description: 'The location of the open catalogi api (change if you are running your own api)'
required: false
type: string
default: 'https://api.opencatalogi.nl/api'
nextcloud_api_url:
description: 'The location of the nextcloud open catalogi api (change if you are running your own api)'
required: false
type: string
default: 'https://directory.opencatalogi.nl/index.php/apps/opencatalogi/api'
admin_url:
description: 'The admin (dashboard) url used'
required: false
type: string
default: 'https://api.opencatalogi.nl/admin'
base_url:
description: 'The BASE location of the open catalogi api (change if you are running your own api)'
required: false
type: string
default: 'https://api.opencatalogi.nl'
frontend_url:
description: 'the location (url) of this open catalogi installation'
required: false
type: string
default: 'https://api.opencatalogi.nl'
login_redirect:
description: 'publiccode.yml path'
required: false
type: string
default: 'vault'
admin_dashboard_url:
description: 'the location of the pen catalogi dashboard'
required: false
type: string
default: 'https://admin.opencatalogi.nl'
arrow_breadcrumbs:
description: 'Whether to use arrow breadcrumbs instead of the normal breadcrumbs'
required: false
type: boolean
default: false
# Build configuration
env_vars_set:
description: 'Whether to use the env variables set in this file, set to false to use env variables of the OpenCatalogi config files'
required: true
type: boolean
default: true
github_pages_branch:
description: 'The branch on which the GitHub page will be build'
required: false
type: string
default: 'gh-pages'
github_repository_name_as_prefix:
description: 'Whether to use the GitHub repository name as a prefix, set to false when using a custom domain'
required: false
type: boolean
default: true
repository:
description: 'The GitHub repository to use (could be an external repository)'
required: false
type: string
default: ${{ github.event.repository.name }}
pull_from_branche:
description: 'The branch on which to base the build, e.g. main or development'
required: false
type: string
default: 'main'
# Git Configuration
git_name:
description: 'Git name configuration for the commit'
required: false
type: string
default: 'Open Catalogi bot'
git_mail:
description: 'Git mail configuration for the commit'
required: false
type: string
default: '[email protected]'
git_commit_message:
description: 'The description for the commit'
required: false
type: string
default: ${{ github.event.repository.html_url }}
github_organization_url:
description: 'The repository to which the results are limited (used to only look in your own organization)'
required: false
type: string
default: 'https://github.com/${{ github.repository_owner }}'
outputs:
page:
description: 'A zip of the build page'
runs:
using: "composite"
steps:
# Lets check al the environment variables that we are using
- name: Print env variables
shell: bash
run: env | sort
- name: Get the Open Catalogi Web APP
uses: actions/checkout@v2
with:
repository: OpenCatalogi/web-app
ref: ${{ inputs.pull_from_branche }}
# With special thanxs to https://github.com/SpicyPizza/create-envfile
- name: Make envfile
uses: SpicyPizza/[email protected]
with:
envkey_GATSBY_ENV_VARS_SET: ${{ inputs.env_vars_set }}
envkey_GATSBY_USE_GITHUB_REPOSITORY_NAME_AS_PATH_PREFIX: ${{ inputs.github_repository_name_as_prefix }}
envkey_GATSBY_GITHUB_REPOSITORY_NAME: ${{ inputs.repository }}
envkey_GATSBY_OPTIONAL_START_PAGE: ${{ inputs.start_page }}
envkey_GATSBY_COMMONGROUND_CHARTS: ${{ inputs.commonground_charts }}
envkey_GATSBY_FILTER_FORKS: ${{ inputs.filter_forks }}
envkey_GATSBY_FILTER_RATING: ${{ inputs.filter_rating }}
envkey_GATSBY_FILTER_RATING_DEFAULT: ${{ inputs.filter_rating_default }}
envkey_GATSBY_FILTER_LAYER: ${{ inputs.filter_layer }}
envkey_GATSBY_FILTER_UPL: ${{ inputs.filter_upl }}
envkey_GATSBY_FILTER_ORGANISATION: ${{ inputs.filter_organisation }}
envkey_GATSBY_FILTER_CATEGORY: ${{ inputs.filter_category }}
envkey_GATSBY_FILTER_PLATFORMS: ${{ inputs.filter_platforms }}
envkey_GATSBY_FILTER_STATUS: ${{ inputs.filter_status }}
envkey_GATSBY_FILTER_MAINTENANCE_TYPES: ${{ inputs.filter_maintenance_types }}
envkey_GATSBY_FILTER_LICENSE: ${{ inputs.filter_license }}
envkey_GATSBY_FILTER_BUSINESS_FUNCTIONS: ${{ inputs.filter_business_functions }}
envkey_GATSBY_FILTER_SOFTWARE_TYPE: ${{ inputs.filter_software_type }}
envkey_GATSBY_FILTER_BUSINESS_SERVICES: ${{ inputs.filter_business_services }}
envkey_GATSBY_FILTER_REFERENCE_COMPONENTS: ${{ inputs.filter_reference_components }}
envkey_GATSBY_ME_URL: ${{ inputs.me_url }}
envkey_GATSBY_API_URL: ${{ inputs.api_url }}
envkey_GATSBY_NEXTCLOUD_API_URL: ${{ inputs.nextcloud_api_url }}
envkey_GATSBY_ADMIN_URL: ${{ inputs.admin_url }}
envkey_GATSBY_BASE_URL: ${{ inputs.base_url }}
envkey_GATSBY_FRONTEND_URL: ${{ inputs.frontend_url }}
envkey_GATSBY_LOGIN_REDIRECT: ${{ inputs.login_redirect }}
envkey_GATSBY_ADMIN_DASHBOARD_URL: ${{ inputs.admin_dashboard_url }}
envkey_GATSBY_NL_DESIGN_THEME_CLASSNAME: ${{ inputs.nl_design_theme_classname }}
envkey_GATSBY_ARROW_BREADCRUMBS: ${{ inputs.arrow_breadcrumbs }}
envkey_GATSBY_FAVICON_URL: ${{ inputs.favicon_logo }}
envkey_GATSBY_PAGE_TITLE: ${{ inputs.page_title }}
envkey_GATSBY_HEADER_LOGO_URL: ${{ inputs.navbar_logo }}
envkey_GATSBY_HEADER_SHOW_LOGIN: ${{ inputs.navbar_show_login }}
envkey_GATSBY_HEADER_CONTENT: ${{ inputs.navbar_content }}
envkey_GATSBY_FOOTER_LOGO_URL: ${{ inputs.footer_logo }}
envkey_GATSBY_FOOTER_SHOW_CREATOR: ${{ inputs.footer_show_creator }}
envkey_GATSBY_FOOTER_CONTENT: ${{ inputs.footer_content }}
envkey_GATSBY_GITHUB_ORGANIZATION_URL: ${{ inputs.github_organization_url }}
envkey_GATSBY_JUMBOTRON_TITLE: ${{ inputs.jumbotron_title }}
envkey_GATSBY_JUMBOTRON_SUBTITLE: ${{ inputs.jumbotron_subtitle }}
envkey_GATSBY_JUMBOTRON_DESCRIPTION: ${{ inputs.jumbotron_description }}
directory: pwa/static
file_name: .env.production
fail_on_empty: true
sort_keys: false
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: 18
- name: Install dependencies
shell: bash
run: cd pwa && npm install
- name: Install parcel/watcher
shell: bash
run: cd pwa && npm install @parcel/watcher
- name: Remove old Gatsby cache
shell: bash
run: rm -rf pwa/.cache
- name: Build application
shell: bash
run: cd pwa && npm run build
- name: Deploy to GitHub Pages
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: ${{ inputs.github_pages_branch }}
folder: pwa/public
git-config-name: ${{ inputs.git_name }}
git-config-email: ${{ inputs.git_mail }}
commit-message: ${{ inputs.git_commit_message }}