Skip to content

Commit c0b7a76

Browse files
committed
Bit more readme info
1 parent 5e889d5 commit c0b7a76

1 file changed

Lines changed: 48 additions & 14 deletions

File tree

README.md

Lines changed: 48 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,30 +7,64 @@ The Action works by running a Python script that reads repository metadata such
77
To use this action, simply include it as a step in your workflow file. No inputs are required.
88

99
````yaml
10-
steps:
11-
- name: Update publiccode.yaml
12-
uses: OpenCatalogi/publiccode-action@v1
13-
env:
14-
GITHUB_REPOSITORY: ${{ github.repository }}
15-
REPO_DESCRIPTION: "This is a sample repository description"
16-
ORGANISATION: "OpenAI"
17-
TAGS: "ai, machine-learning"
18-
WEBSITE: "https://openai.com"
19-
LICENCE: "MIT"
10+
name: My PublicCode Workflow
11+
12+
on:
13+
push:
14+
branches:
15+
- main
16+
17+
jobs:
18+
build:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Update publiccode.yaml
22+
uses: OpenCatalogi/publiccode-action
2023
````
21-
Note: Replace your-github-username with your actual GitHub username, and publiccode-update-action with the name of the repository where this action is hosted.
24+
25+
In the above example a publiccode file is updated every time code on the `main` branche is touched
2226

2327
## Inputs
24-
None
28+
29+
| Input Name | Description | Default Value |
30+
|--------------|--------------------------------------------------------------|-----------------------|
31+
| `name` | Git URL of the remote repository to check (Optional) | Empty String |
32+
| `description` | Git URL of the remote repository to check (Optional) | Empty String |
33+
| `remoterepo` | Git URL of the remote repository to check (Optional) | Empty String |
34+
| `publiccode` | `publiccode.yml` path (Optional), e.g. `data/publiccode.yml` | `publiccode.yml` |
35+
| `gitname` | Git name configuration for bump commit (Optional) | `Open Catalogi bot` |
36+
| `gitmail` | Git mail configuration for bump commit (Optional) | `bot@opencatalogi.nl` |
37+
2538

2639
## Outputs
27-
None
40+
The following outputs are provided by the action and can be used by other aciotns
41+
42+
| Output Name | Description |
43+
|----------------|-------------------------------------------------|
44+
| `version` | New version of the `softwareVersion` field |
45+
| `releaseDate` | New release date of the `releaseDate` field |
46+
47+
## Example
48+
To use this action, simply include it as a step in your workflow file. No inputs are required.
49+
50+
````yaml
51+
steps:
52+
- name: Update publiccode.yaml
53+
uses: OpenCatalogi/publiccode-action
54+
with:
55+
name: "My Codebase"
56+
description: "This is a sample repository description"
57+
publiccode: "publiccode.yml"
58+
gitname: "Open Catalogi bot"
59+
gitmail: "bot@opencatalogi.nl"
60+
````
61+
Note: Replace your-github-username with your actual GitHub username, and publiccode-update-action with the name of the repository where this action is hosted.
2862

2963
## Architecture
3064
### Why python?
3165
Python is nativly supported by github actions underlaying containers and therefore very quick
3266

3367
### Asumptions
34-
We follow the "get data from teh source" princple
68+
We follow the "get data from the source" principle, in practice for this action that means that we se the repository as the source. So any settings in the repository (e.g. name and description) will overwrite the values already pressent in your publiccode.
3569

3670
Please note that this action does not handle errors or exceptions while reading metadata or writing to publiccode.yaml. You should ensure that your repository is properly set up to avoid any issues. For example, make sure that your repository name and description are not empty.

0 commit comments

Comments
 (0)