Skip to content

Commit

Permalink
feat: add new action
Browse files Browse the repository at this point in the history
  • Loading branch information
splincode committed Sep 21, 2024
1 parent bc30831 commit 4d606cd
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions actions/run/read-package-json/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Read json file
description: Read json file

inputs:
path:
description: Path to package json
default: './package.json'
required: false

outputs:
name:
description: name
value: ${{ steps.output.outputs.name }}
version:
description: version
value: ${{ steps.output.outputs.version }}

runs:
using: composite
steps:
- name: Read package-json
id: output
shell: bash
run: |
echo "name=$(jq .name < ${{ inputs.path }})" >> $GITHUB_OUTPUT
echo "version=$(jq .version < ${{ inputs.path }})" >> $GITHUB_OUTPUT

0 comments on commit 4d606cd

Please sign in to comment.