Skip to content

Commit

Permalink
feat: always use latest dprint version (#5)
Browse files Browse the repository at this point in the history
Co-authored-by: David Sherret <dsherret@gmail.com>
  • Loading branch information
kevgo and dsherret committed Sep 12, 2021
1 parent c0bed7c commit afcd0d0
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 4 deletions.
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

0 comments on commit afcd0d0

Please sign in to comment.