88[ ![ Quality Gate Status] ( https://sonarcloud.io/api/project_badges/measure?project=cssnr_env-json-action&metric=alert_status )] ( https://sonarcloud.io/summary/new_code?id=cssnr_env-json-action )
99[ ![ GitHub Last Commit] ( https://img.shields.io/github/last-commit/cssnr/env-json-action?logo=github&label=updated )] ( https://github.com/cssnr/env-json-action/pulse )
1010[ ![ Codeberg Last Commit] ( https://img.shields.io/gitea/last-commit/cssnr/env-json-action/master?gitea_url=https%3A%2F%2Fcodeberg.org%2F&logo=codeberg&logoColor=white&label=updated )] ( https://codeberg.org/cssnr/env-json-action )
11- [ ![ GitHub Contributors] ( https://img.shields.io/github/contributors/cssnr/env-json-action?logo=github )] ( https://github.com/cssnr/env-json-action/graphs/contributors )
11+ [ ![ GitHub Contributors] ( https://img.shields.io/github/contributors-anon /cssnr/env-json-action?logo=github )] ( https://github.com/cssnr/env-json-action/graphs/contributors )
1212[ ![ GitHub Repo Size] ( https://img.shields.io/github/repo-size/cssnr/env-json-action?logo=bookstack&logoColor=white&label=repo%20size )] ( https://github.com/cssnr/env-json-action?tab=readme-ov-file#readme )
1313[ ![ GitHub Top Language] ( https://img.shields.io/github/languages/top/cssnr/env-json-action?logo=htmx )] ( https://github.com/cssnr/env-json-action )
1414[ ![ GitHub Discussions] ( https://img.shields.io/github/discussions/cssnr/env-json-action?logo=github )] ( https://github.com/cssnr/env-json-action/discussions )
2323- [ Inputs] ( #Inputs )
2424- [ Outputs] ( #Outputs )
2525- [ Examples] ( #Examples )
26+ - [ Tags] ( #Tags )
2627- [ Support] ( #Support )
2728- [ Contributing] ( #Contributing )
2829
29- Convert an Environment File to or from JSON for Outputs or Writing to a File.
30+ Convert Environment File, Data or Keys, to or from, JSON Data or File.
31+
32+ Also allows masking the data as secret (only viable for source files since inputs are exposed).
3033
3134> [ !NOTE]
3235> Please submit a [ Feature Request] ( https://github.com/cssnr/env-json-action/discussions/categories/feature-requests )
3336> for new features or [ Open an Issue] ( https://github.com/cssnr/env-json-action/issues ) if you find any bugs.
3437
3538## Inputs
3639
37- | input | required | default | description |
38- | --------- | :------: | ------- | ------------------------------------ |
39- | source | ** Yes** | - | Source Environment or JSON File Path |
40- | type | - | ` json ` | Output Type: [ ` json ` , ` env ` ] \* |
41- | dest | - | - | Optional File to Write Data Too |
42- | sensitive | - | ` false ` | Sensitive Data \* |
43- | summary | - | ` true ` | Add Summary to Job \* |
40+ | Input | Default | Description  ; of  ; Input |
41+ | :-------------------------- | :--------: | :--------------------------------- |
42+ | [ source-data] ( #source-data ) | _ Required_ | Source Data or File Path |
43+ | [ source-type] ( #source-type ) | ` json ` | Source Type: [ ` json ` , ` env ` ] |
44+ | [ output-type] ( #output-type ) | _ Opposite_ | Output Type: [ ` json ` , ` env ` ] |
45+ | [ output-file] ( #output-file ) | - | Optional File to Write Output Data |
46+ | [ sensitive] ( #sensitive ) | ` false ` | Mark Output Data as Sensitive |
47+ | [ summary] ( #summary ) | ` true ` | Add Summary to Job |
48+
49+ #### source-data
50+
51+ Source Environment or JSON Data or File Path.
52+
53+ _ Previously:_ ` source `
54+
55+ #### source-type
56+
57+ Source Data Type,
58+ one of: [ ` json ` , ` env ` ]
59+
60+ _ Previously:_ ` type `
61+
62+ #### output-type
63+
64+ Output Data Type,defaults to the opposite of ` source-type ` ,
65+ one of: [ ` json ` , ` env ` ]
66+
67+ _ Previously:_ ` output `
4468
45- ** type ** - By default this converts env to json. To perform json to env, use type ` env ` .
69+ #### output-file
4670
47- ** sensitive ** - Set to ` true ` if data is sensitive and should be masked .
71+ Optional File Path to Write the Output Data .
4872
49- ** summary** - Write a Summary for the job. To disable this set to ` false ` .
73+ _ Previously:_ ` file `
74+
75+ #### sensitive
76+
77+ Set to ` true ` if data is sensitive and should be masked.
78+ This will mask the data as a whole, plus every individual value.
79+
80+ #### summary
81+
82+ Write a Summary for the job. To disable this set to ` false ` .
5083
5184<details ><summary >👀 View Example Summary</summary >
5285
@@ -75,21 +108,21 @@ To see a workflow run you can view a recent
75108- name : ' Parse Environment'
76109 uses : cssnr/env-json-action@master
77110 with :
78- source : test.env
111+ source-data : test.env
79112` ` `
80113
81114## Outputs
82115
83- | output | description |
84- | ------ | - -------------------------- |
116+ | Output | Description |
117+ | : ----- | : -------------------------- |
85118| result | JSON or Environment Results |
86119
87120` ` ` yaml
88121- name : ' Parse Environment'
89122 id : parse
90123 uses : cssnr/env-json-action@master
91124 with :
92- source : test.env
125+ source-data : test.env
93126
94127- name : ' Echo Result'
95128 run : echo '${{ steps.parse.outputs.result }}'
@@ -99,9 +132,6 @@ To see a workflow run you can view a recent
99132
100133There are some more examples in the test workflow: [.github/workflows/test.yaml](.github/workflows/test.yaml)
101134
102- For a full deploy workflow example, see:
103- https://github.com/cssnr/django5-boiler/blob/master/.github/workflows/deploy.yaml
104-
105135For more examples, you can check out other projects using this action:
106136https://github.com/cssnr/env-json-action/network/dependents
107137
@@ -147,38 +177,35 @@ If you would like to submit a PR, please review the [CONTRIBUTING.md](#contribut
147177Additionally, you can support other GitHub Actions I have published :
148178
149179- [Stack Deploy Action](https://github.com/cssnr/stack-deploy-action?tab=readme-ov-file#readme)
150- - [Portainer Stack Deploy](https://github.com/cssnr/portainer-stack-deploy-action?tab=readme-ov-file#readme)
180+ - [Portainer Stack Deploy Action](https://github.com/cssnr/portainer-stack-deploy-action?tab=readme-ov-file#readme)
181+ - [Docker Context Action](https://github.com/cssnr/docker-context-action?tab=readme-ov-file#readme)
151182- [VirusTotal Action](https://github.com/cssnr/virustotal-action?tab=readme-ov-file#readme)
152183- [Mirror Repository Action](https://github.com/cssnr/mirror-repository-action?tab=readme-ov-file#readme)
153184- [Update Version Tags Action](https://github.com/cssnr/update-version-tags-action?tab=readme-ov-file#readme)
185+ - [Docker Tags Action](https://github.com/cssnr/docker-tags-action?tab=readme-ov-file#readme)
154186- [Update JSON Value Action](https://github.com/cssnr/update-json-value-action?tab=readme-ov-file#readme)
155187- [JSON Key Value Check Action](https://github.com/cssnr/json-key-value-check-action?tab=readme-ov-file#readme)
156188- [Parse Issue Form Action](https://github.com/cssnr/parse-issue-form-action?tab=readme-ov-file#readme)
157189- [Cloudflare Purge Cache Action](https://github.com/cssnr/cloudflare-purge-cache-action?tab=readme-ov-file#readme)
158190- [Mozilla Addon Update Action](https://github.com/cssnr/mozilla-addon-update-action?tab=readme-ov-file#readme)
159- - [Docker Tags Action](https://github.com/cssnr/docker-tags-action?tab=readme-ov-file#readme)
160191- [Package Changelog Action](https://github.com/cssnr/package-changelog-action?tab=readme-ov-file#readme)
161192- [NPM Outdated Check Action](https://github.com/cssnr/npm-outdated-action?tab=readme-ov-file#readme)
162193- [Label Creator Action](https://github.com/cssnr/label-creator-action?tab=readme-ov-file#readme)
163194- [Algolia Crawler Action](https://github.com/cssnr/algolia-crawler-action?tab=readme-ov-file#readme)
164195- [Upload Release Action](https://github.com/cssnr/upload-release-action?tab=readme-ov-file#readme)
165196- [Check Build Action](https://github.com/cssnr/check-build-action?tab=readme-ov-file#readme)
166197- [Web Request Action](https://github.com/cssnr/web-request-action?tab=readme-ov-file#readme)
198+ - [Get Commit Action](https://github.com/cssnr/get-commit-action?tab=readme-ov-file#readme)
167199
168200<details><summary>❔ Unpublished Actions</summary>
169201
170202These actions are not published on the Marketplace, but may be useful.
171203
172- Generic Actions :
173-
174- - [cssnr/draft-release-action](https://github.com/cssnr/draft-release-action) - Keep a draft release ready to publish.
175- - [cssnr/env-json-action](https://github.com/cssnr/env-json-action) - Convert env file to json or vice versa.
176- - [cssnr/get-commit-action](https://github.com/cssnr/get-commit-action) - Get the current commit with full details.
177-
178- Specific Actions :
179-
180- - [cssnr/push-artifacts-action](https://github.com/cssnr/push-artifacts-action) - Sync's artifacts to a remote host.
181- - [smashedr/update-release-notes-action](https://github.com/smashedr/update-release-notes-action) - Update release notes.
204+ - [cssnr/draft-release-action](https://github.com/cssnr/draft-release-action?tab=readme-ov-file#readme) - Keep a draft release ready to publish.
205+ - [cssnr/env-json-action](https://github.com/cssnr/env-json-action?tab=readme-ov-file#readme) - Convert env file to json or vice versa.
206+ - [cssnr/push-artifacts-action](https://github.com/cssnr/push-artifacts-action?tab=readme-ov-file#readme) - Sync files to a remote host with rsync.
207+ - [smashedr/update-release-notes-action](https://github.com/smashedr/update-release-notes-action?tab=readme-ov-file#readme) - Update release notes.
208+ - [smashedr/combine-release-notes-action](https://github.com/smashedr/combine-release-notes-action?tab=readme-ov-file#readme) - Combine release notes.
182209
183210---
184211
0 commit comments