Skip to content

Commit

Permalink
Update update-rete-cli.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Ni55aN authored Jan 27, 2024
1 parent 8cc4b49 commit 8644f6d
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions .github/workflows/update-rete-cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,16 +77,17 @@ jobs:
node-version: 20
- name: Check if Rete CLI is needed to update
id: check
run: |
installed=$(npm list rete-cli -p)
if [[ -z $installed ]]; then
echo "installed=false" >> "$GITHUB_OUTPUT"
else
echo "installed=true" >> "$GITHUB_OUTPUT"
fi
uses: actions/github-script@v7
with:
script: |
const pkg = require('./package.json')
const deps = [
...Object.keys(pkg.dependencies || {}),
...Object.keys(pkg.devDependencies || {})
]
return deps.includes('rete-cli')
- name: Update Rete CLI
if: steps.check.outputs.installed == 'true'
if: steps.check.outputs.result == 'true'
run: |
npm i rete-cli@${{ inputs.version }}
- name: Create Pull Request
Expand Down

0 comments on commit 8644f6d

Please sign in to comment.