Skip to content

Commit 61de2a6

Browse files
Updated README.md steps to run
1 parent d6be356 commit 61de2a6

File tree

1 file changed

+43
-29
lines changed

1 file changed

+43
-29
lines changed

Diff for: README.md

+43-29
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,20 @@ application will attempt to infer sufficient/required properties from the
2323
target project and generate the best possible metadata for inclusion in the
2424
agency inventory.
2525

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+
2840
The code.json file can be generated by any of the GitHub Actions:
2941

3042
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:
3345

3446
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.
3547

36-
Branch Directory
37-
---------------
48+
### Branch Directory
49+
3850
1. output - includes the code.json file generated by the [daily.yml](https://github.com/USEPA/code-json-generator/actions/workflows/daily.yml).
3951
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.
4052
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.
4153

4254

43-
Getting Started - deploying to cloud.gov
44-
---------------
55+
Getting Started
56+
=========
4557

4658
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.
4860

49-
### Prerequisites
61+
## Prerequisites
62+
63+
Follow these prerequisites for running code.json generator locally, in GitHub, and for deploying to cloud.gov.
5064

5165
This application is a command line Node application. Node must be installed
5266
on the system prior to running this application.
@@ -71,11 +85,9 @@ is provided to help get started.
7185
3. Move the new configuration file from the etc folder into the bin folder.
7286
4. Rename the configuration file to create-agency-inventory-config.js.
7387

74-
Running locally or on cloud.gov
75-
-------------------------------
76-
You can run the code.json generator locally or deploy it to cloud.gov.
7788

78-
### Run the application locally
89+
## Run the application locally
90+
7991

8092
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.
8193

@@ -107,9 +119,23 @@ $ create-inventory.js --configFile ./create-agency-inventory.config.json > code.
107119
> in the current working directory and is called `create-agency-inventory.config.json`.
108120
> Adjust this usage to suit actual work environment.
109121
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.
113139

114140
### Prerequisites
115141
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.
134160

135161
5. You will see the code.json file located at: your-app-name.app.cloud.gov/code.json
136162

137-
### Update frequency of the Agency's code.json file
163+
#### Update frequency of the Agency's code.json file
138164

139165
You can modify how frequently the Agency's code.json file is generated and published to cloud.gov.
140166

@@ -146,20 +172,8 @@ You can modify how frequently the Agency's code.json file is generated and publi
146172

147173
4. Save, commit and push your changes.
148174

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-
161175
Development
162-
-----------
176+
=========
163177

164178
To develop and possibly contribute to this project please review the
165179
[code of conduct][4] and [contributing guidelines][5].

0 commit comments

Comments
 (0)