You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+48-14Lines changed: 48 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,30 +7,64 @@ The Action works by running a Python script that reads repository metadata such
7
7
To use this action, simply include it as a step in your workflow file. No inputs are required.
8
8
9
9
````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
20
23
````
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
| `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.
28
62
29
63
## Architecture
30
64
### Why python?
31
65
Python is nativly supported by github actions underlaying containers and therefore very quick
32
66
33
67
### 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.
35
69
36
70
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