Skip to content

Commit

Permalink
Merge pull request #8 from OpenCatalogi/feature-actionudate
Browse files Browse the repository at this point in the history
feature-action-update
  • Loading branch information
remko48 authored Jan 31, 2024
2 parents 87d8e8a + bf84029 commit 3fcb52b
Show file tree
Hide file tree
Showing 2 changed files with 92 additions and 86 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,11 @@ permissions:
> ![Page Action done](docs/page_build_done.png)


## Input

## Inputs

| Input Name | Description | Required | Type | Default Value |
|------------------------------------|---------------------------------------------------------------------------------------------------------|----------|---------|--------------------------------------------------------------------------|
| `env_vars_set` | Whether to use the env variables set in this file, set to false to use env variables of the OpenCatalogi config files | Yes | boolean | `true` |
| `github_pages_branch` | The branch on which the GitHub page will be built (Optional) | No | string | `gh-pages` |
| `github_repository_name_as_prefix` | Whether to use the GitHub repository name as a prefix (Optional) | No | boolean | `true` |
| `repository` | The GitHub repository to use (could be an external repository) (Optional) | No | string | `${{ github.event.repository.name }}` |
Expand Down
175 changes: 91 additions & 84 deletions action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,68 +7,9 @@ branding:
color: 'blue'

inputs:
# Build configuration
github_pages_branch:
description: 'The banche on wish the github page wil 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 branche on witch to base the build e.g. main or development'
required: false
type: string
default: 'main'

# 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'
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'

# General
favicon_logo:
description: 'An base64 encoded svg file or url to the logo used as favicon'
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]'
Expand All @@ -78,34 +19,29 @@ inputs:
type: string
default: ${{ github.event.repository.name }}
nl_design_theme_classname:
description: 'the class name of the desired nl design theme'
description: 'The class name of the desired NL design theme'
required: false
type: string
default: 'open-webconcept-theme'
arrow_breadcrumbs:
description: 'whether to use arrow breadcrums instead of the normal breadcrumbs'
required: false
type: boolean
default: false
start_page:
description: 'When given shows a readme file instead of the normal start page'
description: 'When given, shows a readme file instead of the normal start page'
required: false
type: string
default: 'false'

# Header
navbar_logo:
description: 'An 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_show_login:
description: 'Shows the inloggen option'
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: 'An link to the json file that manages the footer 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'
Expand All @@ -117,7 +53,7 @@ inputs:
type: string
default: ${{ github.event.repository.name }}
jumbotron_subtitle:
description: 'The (short) subtitle used in the jumbotron'
description: 'The (short) subtitle used in the jumbotron'
required: false
type: string
default: 'Product page'
Expand All @@ -126,6 +62,7 @@ inputs:
required: false
type: string
default: ${{ github.event.repository.description }}

jumbotron_searchform:
description: 'Whether or not to display the search form'
required: false
Expand All @@ -142,14 +79,14 @@ inputs:
type: string
default: "false"
jumbotron_image_url:
description: 'An base64 encoded svg file or url to the logo used in the jumbotron'
description: 'A base64 encoded SVG file or URL to the logo used in the jumbotron'
required: false
type: string
default: "false"

# Footer
footer_logo:
description: 'An base64 encoded svg file or url to the logo used in the footer'
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]'
Expand All @@ -159,12 +96,81 @@ inputs:
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'
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'
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 Configuration
git_name:
description: 'Git name configuration for the commit'
required: false
Expand All @@ -176,12 +182,12 @@ inputs:
type: string
default: '[email protected]'
git_commit_message:
description: 'The description for the commit'
description: 'The description for the commit'
required: false
type: string
default: ${{ github.event.repository.html_url }}
github_organization_url:
description: 'The repository to wich the results are limited (used to only look in your own organisation)'
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 }}'
Expand All @@ -208,6 +214,7 @@ runs:
- 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 }}
Expand Down Expand Up @@ -267,7 +274,7 @@ runs:
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 }}
git-config-name: ${{ inputs.git_name }}
git-config-email: ${{ inputs.git_mail }}
commit-message: ${{ inputs.git_commit_message }}

0 comments on commit 3fcb52b

Please sign in to comment.