Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added small warning to rerun jobs when they fail & improve spelling #15

Merged
merged 1 commit into from
Mar 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 23 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Open Catalogi action
This action builds on organisation specific Open Catalogi page as static github page.|
This action builds on the organization-specific Open Catalogi page as a static GitHub page.

## Usage
To use this action, simply include it as a step in your workflow file. No inputs are required.
Expand All @@ -19,35 +19,37 @@ jobs:
uses: OpenCatalogi/opencatalogi-action@latest
````

In the above example an page is created or updated every night at 0:00, we advise this route becouse you will autmaticly suplied with fixes and new features. You can however also choose other options to trigger a page build
In the above example a page is created or updated every night at 0:00, we advise this route because you will automatically be supplied with fixes and new features. You can however also choose other options to trigger a page build

To trigger a page build whenever you commit something to the main branche
To trigger a page build whenever you commit something to the main branch
````yaml
on:
push:
branches:
- main
````
> **Warning**
> It is possible that this workflow fails, a simple 'rerun job' in your GitHub actions might be enough to fix this.

To gain a bit more control and only trigger a page build manually usw
To gain a bit more control and only trigger a page build manually use
````yaml
on:
workflow_dispatch:
````
> **Warning**
> If you do not supply the action with an access token or an SSH key, you must access your repositories settings and provide `Read and Write Permissions` to the provided `GITHUB_TOKEN`, otherwise you'll potentially run into permission issues. Alternatively you can set the following in your workflow file to grant the action the permissions it needs.
> If you do not supply the action with an access token or an SSH key, you must access your repositories settings and provide `Read and Write Permissions` to the provided `GITHUB_TOKEN`, otherwise you'll potentially run into permission issues. Alternatively, you can set the following in your workflow file to grant the action the permissions it needs.

```yml
permissions:
contents: write
```

> **Note**
> When you first run the workflow you need to `manually` activate github pages on your repository! Head over to setting -> pages. Select `deploy form a branch` as a source and `gh-pages` as your branche (unles you configured the page to be build in a differend branche)
> When you first run the workflow you need to `manually` activate GitHub pages on your repository! Head over to settings -> pages. Select `deploy form a branch` as a source and `gh-pages` as your branche (unless you configured the page to be built in a different branch)
> ![Page Settings](docs/page_settings.png)
> Afther pressing save head over tot the actions and take a look at the `pages build and deployment` action
> After pressing save head over to the actions and take a look at the `pages build and deployment` action
> ![Page Action](docs/page_build.png)
> When it is done it will also tell you under wich link you can find your page
> When it is done it will also tell you under which link you can find your page
> ![Page Action done](docs/page_build_done.png)


Expand All @@ -72,19 +74,19 @@ permissions:
| `start_page` | When given, shows a readme file instead of the normal start page (Optional) | No | string | `false` |
| `filter_forks` | If you want to have the filter forks displayed, set to false to not show the filter (Optional) | No | string | ` ` |
| `filter_rating` | What kind of rating must be shown, OpenCatalogi or Commonground (Optional) | No | string | `OpenCatalogi` |
| `filter_layer` | If you want to have the filter layer displayed, set to false to not show the filter (Optional) | No | string | ` ` |
| `filter_upl` | If you want to have the filter upl displayed, set to false to not show the filter (Optional) | No | string | ` ` |
| `filter_layer` | If you want to have the filter layer displayed, set it to false to not show the filter (Optional) | No | string | ` ` |
| `filter_upl` | If you want to have the filter upl displayed, set it to false to not show the filter (Optional) | No | string | ` ` |
| `filter_organisation` | If you want to have the filter organisation displayed, set to false to not show the filter (Optional) | No | string | ` ` |
| `filter_category` | If you want to have the filter category displayed, set to false to not show the filter (Optional) | No | string | ` ` |
| `filter_category` | If you want to have the filter category displayed, set it to false to not show the filter (Optional) | No | string | ` ` |
| `filter_platforms` | If you want to have the filter platforms displayed, set to false to not show the filter (Optional) | No | string | ` ` |
| `filter_status` | If you want to have the filter status displayed, set to false to not show the filter (Optional) | No | string | ` ` |
| `filter_status` | If you want to have the filter status displayed, set it to false to not show the filter (Optional) | No | string | ` ` |
| `filter_maintenance_types` | If you want to have the filter maintenance_types displayed, set to false to not show the filter (Optional) | No | string | ` ` |
| `filter_license` | If you want to have the filter license displayed, set to false to not show the filter (Optional) | No | string | ` ` |
| `filter_license` | If you want to have the filter license displayed, set it to false to not show the filter (Optional) | No | string | ` ` |
| `filter_business_functions` | If you want to have the filter business functions displayed, set to false to not show the filter (Optional) | No | string | ` ` |
| `filter_software_types` | If you want to have the filter software types displayed, set to false to not show the filter (Optional) | No | string | ` ` |
| `filter_business_services` | If you want to have the filter business services displayed, set to false to not show the filter (Optional) | No | string | ` ` |
| `filter_reference_components` | If you want to have the filter reference components displayed, set to false to not show the filter (Optional) | No | string | ` ` |
| `favicon_logo` | A base64 encoded SVG file or URL to the logo used as favicon (Optional) | No | string | `https://openwebconcept.nl/wp-content/themes/openwebconcept/assets/src/images/[email protected]` |
| `favicon_logo` | A base64 encoded SVG file or URL to the logo used as a favicon (Optional) | No | string | `https://openwebconcept.nl/wp-content/themes/openwebconcept/assets/src/images/[email protected]` |
| `page_title` | The title for the website / gitpage (Optional) | No | string | `${{ github.event.repository.name }}` |
| `navbar_logo` | An base64 encoded SVG file or URL to the logo used in the main menu (Optional) | No | string | `https://openwebconcept.nl/wp-content/themes/openwebconcept/assets/src/images/[email protected]` |
| `navbar_show_login` | Shows the inloggen option (Optional) | No | boolean | `false` |
Expand All @@ -98,7 +100,7 @@ permissions:
| `git_name` | Git name configuration for the commit (Optional) | No | string | `Open Catalogi bot` |
| `git_mail` | Git mail configuration for the commit (Optional) | No | string | `[email protected]` |
| `git_commit_message` | The description for the commit (Optional) | No | string | `${{ github.event.repository.html_url }}` |
| `github_organization_url` | The repository to which the results are limited (used to only look in your own organisation) (Optional) | No | string | `https://github.com/${{ github.repository_owner }}` |
| `github_organization_url` | The repository to which the results are limited (used to only look in your own organization) (Optional) | No | string | `https://github.com/${{ github.repository_owner }}` |



Expand All @@ -109,7 +111,7 @@ permissions:
| `page` | A zip of the build page |

## Tips
Besides making creating a frontend for your catalogue its also a goed idea to define how your organisation uses open source. Luckily this is verey easilly don by adding the publiccode action to your workflow
Besides creating a front end for your catalogue it's also a good idea to define how your organization uses open source. Luckily this is very easily done by adding the publiccode action to your workflow

````yaml
name: My PublicCode Workflow
Expand All @@ -131,8 +133,8 @@ jobs:

[Read more](https://github.com/marketplace/actions/create-or-update-publiccode-yaml) about the publiccode action that also creates the opencatalogi.yaml

## Working with branche protection
Keep in mind that this action creates/updates a file and force pushes into the beanche it was run on. It is therfore incompatible with github branche protection ON THE SAME branche. You can hower the wrokflow to start higher up in the branche tree to circumvent this. e.g. if you normaly work with a branche setup like:
## Working with branch protection
Keep in mind that this action creates/updates a file and force pushes into the branch it was run on. It is therefore incompatible with GitHub branch protection ON THE SAME branch. You can however the workflow to start higher up in the branche tree to circumvent this. e.g. if you normally work with a branch setup like:

- Master (protected)
- - Development (protected)
Expand All @@ -148,10 +150,10 @@ on:
- 'feature-*'
````

The adjusted publiccode or opencatalogi files will then come allong in you normal pull requests from `feature-x` to `developement`etc.
The adjusted publiccode or opencatalogi files will then come along in your normal pull requests from `feature-x` to `development`, etc.

## Special thanxs
As is the case with most software this action is based on the work of others, and uses there code. We would like to give a special shout out to the following parties and thier code
## Special thanks
As is the case with most software this action is based on the work of others and uses their code. We would like to give a special shout-out to the following parties and their code

- [James Ives | github-pages-deploy-action#readme](https://github.com/JamesIves/github-pages-deploy-action#readme]).
- [SpicyPizza | create-envfile](https://github.com/SpicyPizza/create-envfile).
Expand Down