top

github-action-package

Buy me a coffee CI

Read and modify the contents of package.json.

Example Usage

- name: package.json info
  id: info
  uses: jaywcjlove/github-action-package@main

- run: echo "name - ${{ steps.info.outputs.name }}"
- run: echo "version - ${{ steps.info.outputs.version }}"
- run: echo "description - ${{ steps.info.outputs.description }}"
- run: echo "author - ${{ steps.info.outputs.author }}"
- name: package.json info
  id: info
  uses: jaywcjlove/github-action-package@main
  with:
    data: |
      {
        "name": "@jaywcjlove/github-action-package-test"
      }

- run: echo "name - ${{ steps.info.outputs.name }}"
- run: echo "version - ${{ steps.info.outputs.version }}"
- run: echo "description - ${{ steps.info.outputs.description }}"
- run: echo "author - ${{ steps.info.outputs.author }}"
- name: package.json info
  id: info
  uses: jaywcjlove/github-action-package@main
  with:
    rename: '@jaywcjlove/github-action-package-test'

- run: echo "name - ${{ steps.info.outputs.name }}"
- run: echo "version - ${{ steps.info.outputs.version }}"
- run: echo "description - ${{ steps.info.outputs.description }}"
- run: echo "author - ${{ steps.info.outputs.author }}"

delete nested values

{
  "name": "github-action-package",
  "author": "jaywcjlove",
  "repository": {
    "type": "git",
    "url": "https://github.com/jaywcjlove/github-action-package"
  },
  "keywords": [
    "actions",
    "package"
  ]
}
- name: package.json info
  uses: jaywcjlove/github-action-package@main
  with:
    unset: repository.type,repository.url,keywords

Output:

{
  "name": "github-action-package",
  "author": "jaywcjlove",
  "repository": {}
}

Inputs

Output Parameters

See Also

Contributors

As always, thanks to our amazing contributors!

Made with action-contributors.

License

Licensed under the MIT License.

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy