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

feat: always use latest dprint version #5

Merged
merged 6 commits into from Sep 12, 2021
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 6 additions & 1 deletion .github/workflows/CI.yml
Expand Up @@ -9,5 +9,10 @@ jobs:
- name: Checkout sources
uses: actions/checkout@v2

- name: Check formatting
- name: Check formatting latest
uses: ./

- name: Check formatting specific version
uses: ./
with:
dprint-version: 0.17.0
16 changes: 15 additions & 1 deletion README.md
Expand Up @@ -14,5 +14,19 @@ jobs:
steps:
- uses: actions/checkout@v2

- uses: dprint/check@v1.6
- uses: dprint/check@v2.0
```

### Latest Version

By default, `dprint/check` uses the latest version of dprint.

### Specific Version

To use a specific version, specify that with the `dprint-version` input:

```yml
- uses: dprint/check@v2.0
with:
dprint-version: "0.17.0"
```
7 changes: 6 additions & 1 deletion action.yml
Expand Up @@ -2,13 +2,18 @@
name: 'dprint-check-action'
description: 'Run `dprint check` on your source code'
author: 'thomaseizinger'
inputs:
dprint-version:
description: 'Specific dprint version to use (ex. 0.17.0)'
required: false
default: ''
runs:
using: 'composite'
steps:
- name: Install dprint
shell: bash
run: |
curl -fsSL https://dprint.dev/install.sh | sh -s 0.17.0 > /dev/null 2>&1
curl -fsSL https://dprint.dev/install.sh | sh -s ${{ inputs.dprint-version }} > /dev/null 2>&1
echo "/home/runner/.dprint/bin" >> $GITHUB_PATH
- name: Check formatting
shell: bash
Expand Down
1 change: 0 additions & 1 deletion dprint.json
@@ -1,5 +1,4 @@
{
"$schema": "https://dprint.dev/schemas/v0.json",
"incremental": true,
"includes": ["**/*.{md,json}"],
"plugins": [
Expand Down