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
+43-29
Original file line number
Diff line number
Diff line change
@@ -23,8 +23,20 @@ application will attempt to infer sufficient/required properties from the
23
23
target project and generate the best possible metadata for inclusion in the
24
24
agency inventory.
25
25
26
-
Using GitHub Actions to generate the code.json file
27
-
---------------
26
+
Agency code.json daily update through GitHub Actions
27
+
=========
28
+
29
+
GitHub Actions is being used to run a scheduled event to create the Agency's code.json file daily.
30
+
31
+
As mentioned earlier, if a "code.json" snippet file is not provided by the project maintainer, the
32
+
application will attempt to infer sufficient/required properties from the
33
+
target project and generate the best possible metadata for inclusion in the
34
+
agency inventory.
35
+
36
+
The example EPA Agency code.json for the github.com/USEPA organization can be [found here](https://github.com/USEPA/code-json-generator/tree/output).
37
+
38
+
### Generating the code.json file
39
+
28
40
The code.json file can be generated by any of the GitHub Actions:
29
41
30
42
1. The [daily.yml](https://github.com/USEPA/code-json-generator/actions/workflows/daily.yml) generates the code.json file to this repository's [output branch](https://github.com/USEPA/code-json-generator/tree/output). This workflow is enabled.
@@ -33,20 +45,22 @@ The code.json file can be generated by any of the GitHub Actions:
33
45
34
46
3. The [go-push (replacing Build and Deploy)](https://github.com/USEPA/code-json-generator/actions/workflows/go-push.yml) generates the code.json file to this repository's [master branch](https://github.com/USEPA/code-json-generator/tree/master) on the git push command. This workflow is disabled.
35
47
36
-
Branch Directory
37
-
---------------
48
+
### Branch Directory
49
+
38
50
1. output - includes the code.json file generated by the [daily.yml](https://github.com/USEPA/code-json-generator/actions/workflows/daily.yml).
39
51
2. cloudgov-deployment - provides intial code-json-generator GitHub Action workflow and removes 4000+ commit history generating the code.json file and deploying to cloud.gov.
40
52
3. including-history and history-cloud.gov-deployment - provides intial code-json-generator GitHub Action workflow and includes 4000+ commit history generating the code.json file and deploying to cloud.gov.
41
53
42
54
43
-
Getting Started - deploying to cloud.gov
44
-
---------------
55
+
Getting Started
56
+
=========
45
57
46
58
This section describes the process to acquire and run the code-json-generator
47
-
application in cloud.gov with the daily-deploy.yml workflow.
59
+
application locally, GitHub, and in cloud.gov.
48
60
49
-
### Prerequisites
61
+
## Prerequisites
62
+
63
+
Follow these prerequisites for running code.json generator locally, in GitHub, and for deploying to cloud.gov.
50
64
51
65
This application is a command line Node application. Node must be installed
52
66
on the system prior to running this application.
@@ -71,11 +85,9 @@ is provided to help get started.
71
85
3. Move the new configuration file from the etc folder into the bin folder.
72
86
4. Rename the configuration file to create-agency-inventory-config.js.
73
87
74
-
Running locally or on cloud.gov
75
-
-------------------------------
76
-
You can run the code.json generator locally or deploy it to cloud.gov.
77
88
78
-
### Run the application locally
89
+
## Run the application locally
90
+
79
91
80
92
Running the application locally will help identify the specific repositories with missing or invalid code.json files. After all repositories have a valid code.json file, running the application will generate the Agency code.json locally.
> in the current working directory and is called `create-agency-inventory.config.json`.
108
120
> Adjust this usage to suit actual work environment.
109
121
110
-
Deployment to Cloud.gov with GitHub Actions
111
-
-------------------------------------------
112
-
You can deploy the app to Cloud.gov with GitHub Actions.
122
+
## Run with GitHub Actions
123
+
124
+
125
+
To run the application with GitHub Actions, you need to:
126
+
127
+
1. Change the working directory to the .github/workflows folder.
128
+
129
+
2. Open the daily.yml file.
130
+
131
+
3. Update the `schedule` event per the desired frequency.
132
+
133
+
4. Save, commit and push your changes.
134
+
135
+
136
+
## Deployment to Cloud.gov with GitHub Actions
137
+
138
+
You can deploy the code.json generator to Cloud.gov with GitHub Actions.
113
139
114
140
### Prerequisites
115
141
To do this you will need a Cloud.gov account and the [Cloud Foundry Command Line Tools](https://github.com/cloudfoundry/cli#installers-and-compressed-binaries) installed on your machine.
@@ -134,7 +160,7 @@ You need to establish the name of your application before deploying it to cloud.
134
160
135
161
5. You will see the code.json file located at: your-app-name.app.cloud.gov/code.json
136
162
137
-
### Update frequency of the Agency's code.json file
163
+
####Update frequency of the Agency's code.json file
138
164
139
165
You can modify how frequently the Agency's code.json file is generated and published to cloud.gov.
140
166
@@ -146,20 +172,8 @@ You can modify how frequently the Agency's code.json file is generated and publi
146
172
147
173
4. Save, commit and push your changes.
148
174
149
-
Agency code.json Daily update through GitHub Actions
150
-
-------------------------------------------
151
-
152
-
GitHub Actions is being used to run a scheduled event to create the Agency's code.json file daily.
153
-
154
-
As mentioned earlier, if a "code.json" snippet file is not provided by the project maintainer, the
155
-
application will attempt to infer sufficient/required properties from the
156
-
target project and generate the best possible metadata for inclusion in the
157
-
agency inventory.
158
-
159
-
The example EPA Agency code.json for the github.com/USEPA organization can be [found here](https://code-json-cg.app.cloud.gov/code.json).
160
-
161
175
Development
162
-
-----------
176
+
=========
163
177
164
178
To develop and possibly contribute to this project please review the
165
179
[code of conduct][4] and [contributing guidelines][5].
0 commit comments