Skip to content

Commit

Permalink
RE-3058 Adding support for generating .tool-versions default file
Browse files Browse the repository at this point in the history
  • Loading branch information
njegosrailic committed Oct 4, 2024
1 parent ef77174 commit 1a50e2f
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/afraid-rings-wonder.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"ci-prettier": patch
---

Adding support for creating default .tool-versions file
12 changes: 12 additions & 0 deletions actions/ci-prettier/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ inputs:
description: ""
required: false
default: ".tool-versions"
nodejs-version:
description:
"NodeJS version used only if the node-version-file isn't provided"
required: false
default: "^20.16.0"
pnpm-version:
description: ""
required: false
Expand Down Expand Up @@ -54,6 +59,13 @@ runs:
with:
fetch-depth: ${{ inputs.checkout-repo-fetch-depth }}

- name: Create .tool-versions file if it doesn't exist
shell: bash
run: |
if [ ! -f "${{ inputs.node-version-file }}" ]; then
echo "nodejs ${{ inputs.nodejs-version }}" > ${{ inputs.node-version-file }}
fi
- name: Setup nodejs
uses: smartcontractkit/.github/actions/setup-nodejs@5b1046c28343660ecb84844c6fa95a66d1cdb52e # [email protected]
with:
Expand Down

0 comments on commit 1a50e2f

Please sign in to comment.