{"id":18952290,"url":"https://github.com/step-security/create-json","last_synced_at":"2026-03-29T03:30:17.936Z","repository":{"id":210482128,"uuid":"726638804","full_name":"step-security/create-json","owner":"step-security","description":"Github Action to create a .json file to use in other steps of the workflow","archived":false,"fork":false,"pushed_at":"2025-02-20T06:26:44.000Z","size":706,"stargazers_count":0,"open_issues_count":6,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-20T07:21:54.331Z","etag":null,"topics":["step-security-maintained-actions"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/step-security.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-12-02T23:29:38.000Z","updated_at":"2025-02-20T06:26:48.000Z","dependencies_parsed_at":"2024-02-22T03:31:15.489Z","dependency_job_id":"324cf936-7994-4aa0-bde1-b69ddb46637f","html_url":"https://github.com/step-security/create-json","commit_stats":null,"previous_names":["step-security/create-json"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/step-security%2Fcreate-json","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/step-security%2Fcreate-json/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/step-security%2Fcreate-json/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/step-security%2Fcreate-json/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/step-security","download_url":"https://codeload.github.com/step-security/create-json/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239951614,"owners_count":19723909,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["step-security-maintained-actions"],"created_at":"2024-11-08T13:32:36.445Z","updated_at":"2026-03-29T03:30:17.869Z","avatar_url":"https://github.com/step-security.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## StepSecurity Maintained `create-json` Action\n\nForked from [jsdaniell/create-json](https://github.com/jsdaniell/create-json)\n\nCreate .json file to use in other steps of the workflow\n\n---\n\nExample of the output on the .json file created:\n\n```json\n{\n  \"name\": \"step-security\",\n  \"password\": \"mypass\"\n}\n```\n\n### How to use\n\nYou can define a json structure on the secrets of your repository:\n\n```json\n{\n  \"name\": \"step-security\",\n  \"password\": \"mypass\"\n}\n```\n\n\u003csub\u003e\u003csup\u003eMY_JSON (Secrets variables can be configured on repository settings \u003e Secrets)\u003c/sup\u003e\u003c/sub\u003e\n\nand use in this way:\n\n```yaml\n- name: create-json\n  id: create-json\n  uses: step-security/create-json@v1\n  with:\n    name: \"credentials.json\"\n    json: ${{ secrets.MY_JSON }}\n```\n\nOr just declare a string of a json on the property `json` like:\n\n```yaml\n- name: create-json\n  id: create-json\n  uses: step-security/create-json@v1\n  with:\n    name: \"new-json-file.json\"\n    json: '{\"name\":\"step-security\", \"password\":\"mypass\"}'\n```\n\n\u003csub\u003e\u003csup\u003eThe json have to be inside a string.\u003c/sup\u003e\u003c/sub\u003e\n\nYou also can save the json on a subdirectory using the property `dir`:\n\n```yaml\n- name: create-json\n  id: create-json\n  uses: step-security/create-json@v1\n  with:\n    name: \"credentials.json\"\n    json: ${{ secrets.CREDENTIALS_JSON }}\n    dir: \"src/\"\n```\n\nRemember that when you create a .json file, the file was not commited, you have to commit the file if you will use the `HEAD` branch with the file to push the repository to other service, like deploy to heroku or other platforms.\n\nIf you want to create more than one json files, you have to specify different IDs for the action like:\n\n```yaml\n- name: create-json\n  id: create-json-1 # First ID\n  uses: step-security/create-json@v1\n  with:\n    name: \"credentials.json\"\n    json: ${{ secrets.CREDENTIALS_JSON }}\n    dir: \"src/\"\n- name: create-json\n  id: create-json-2 # Second ID\n  uses: step-security/create-json@v1\n  with:\n    name: \"other.json\"\n    json: '{\"name\":\"step-security\", \"password\":\"mypass\"}'\n    dir: \"src/\"\n```\n\n### Real Example (Creating and Using on Other Steps)\n\n```yaml\nname: Heroku CI - CD\n\non:\n  push:\n    branches: [master]\n\njobs:\n  deploy:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@master\n      - uses: actions/setup-go@v1\n        with:\n          go-version: \"1.14.6\"\n      - run: cd src \u0026\u0026 go mod vendor\n      - name: create-json\n        id: create-json\n        uses: step-security/create-json@v1\n        with:\n          name: \"devdatatools-firebase-adminsdk.json\"\n          json: ${{ secrets.CREDENTIALS_JSON }}\n          dir: \"src/\"\n      - run: git config --global user.email \"email@outlook.com\" \u0026\u0026 git config --global user.name \"step-security\" \u0026\u0026 git add . \u0026\u0026 git add --force src/devdatatools-firebase-adminsdk.json \u0026\u0026 git status \u0026\u0026 git commit -a -m \"Deploy Heroku Commit with the Credentials JSON created!\"\n      - uses: akhileshns/heroku-deploy@v3.4.6\n        with:\n          heroku_api_key: ${{ secrets.HEROKU_API_KEY }}\n          heroku_app_name: \"dev-data-tools-api-golang\"\n          heroku_email: \"email@outlook.com\"\n          appdir: \"src\"\n```\n\nAfter commit and use with Heroku the file is deleted after the workflow and the JSON is not showed on the log, perfect for public repositories.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstep-security%2Fcreate-json","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstep-security%2Fcreate-json","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstep-security%2Fcreate-json/lists"}