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
With this commit we enabled handling of action input parameters. From
now you can provide the following parameters:
* ipam_version
* ipam_database_host
* ipam_database_user
* ipam_database_pass
* ipam_database_name
* database_root_password
All of these parameters are optional and default values will be
guarantee a working environment anyways.
We also extend our existing tests by providing inputs by environment
variables and test the newly configured database as well.
Finally we demonstrate in the test workflow the ability to use matrix
builds.
Copy file name to clipboardExpand all lines: README.md
+28-12Lines changed: 28 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,36 +11,38 @@ In detail the action start two containers:
11
11
12
12
After that the action does a few things to prepare the phpipam installation:
13
13
14
-
* populate the database with a default data
14
+
* populate the database with default data
15
15
* activate the api
16
-
* create a app for api connection
16
+
* create an app for api connection
17
17
* set required password change for defaut admin to _no_ - this is for local testing purposes
18
18
19
19
## Parameters
20
20
21
-
---
22
-
**Note:**
23
-
24
-
There are several parameters defined in readme. These parameters were currently not used but they are here for future use.
25
-
26
-
---
27
-
28
-
The parameters are prepared as follows:
21
+
We provide the following parameters to configure the phpipam instance database:
29
22
23
+
***ipam_version**: the phpipam version to install: Default: "latest"
30
24
***ipam_database_host**: Database host phpipam connects to. Default: "database"
31
25
***ipam_database_user**: Database user phpipam needs to authenticate. Default: "phpipam"
32
26
***ipam_database_pass**: Database password phpipam needs to authenticate. Default: "phpipam"
33
27
***ipam_database_name**: Database name phpipam uses. Default: "phpipam"
34
28
***database_root_password**: Root password for the database. Default: "root"
35
29
30
+
---
31
+
32
+
**Note:** If you define a database host, the database (**ipam_database_name**) needs to be created or emptied before the action can be executed.
33
+
34
+
---
35
+
36
36
## Usage
37
37
38
-
The action is hosted in a separate repository and available on [github marketplace](https://github.com/marketplace/actions/phpipam-action){:target="_blank"}. To use it you have to add the following to your github workflow:
38
+
The action is hosted in a separate repository and available on [github marketplace](https://github.com/marketplace/actions/phpipam-action). To use it you have to add the following to your github workflow:
39
39
40
40
~~~yaml
41
41
steps:
42
42
- uses: actions/checkout@v2
43
-
- uses: codeaffen/phpipam-action@v1
43
+
- uses: codeaffen/phpipam-action@v2
44
+
with:
45
+
ipam_version: "1.4x"
44
46
~~~
45
47
46
48
If the action finishes successfully you will be able to run your api tests against the phpipam installation.
@@ -50,3 +52,17 @@ If the action finishes successfully you will be able to run your api tests again
50
52
run: |
51
53
curl -k --user Admin:ipamadmin -X POST https://localhost/api/ansible/user/
52
54
~~~
55
+
56
+
With the `ipam_version` parameter you will be able to test against different phpipam versions by using githubs build matrix feature. This is done by defining a job as follows:
0 commit comments