Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RE-3058 Adding support for generating .tool-versions default file #653

Merged
merged 1 commit into from
Oct 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading