diff --git a/.github/workflows/ci.json.yaml b/.github/workflows/ci.json.yaml index cb90b94..bef011a 100644 --- a/.github/workflows/ci.json.yaml +++ b/.github/workflows/ci.json.yaml @@ -11,4 +11,4 @@ on: workflow_dispatch: jobs: lint: - uses: parcelLab/ci/.github/workflows/json.yaml@v9 + uses: ./.github/workflows/json.yaml diff --git a/.github/workflows/ci.pr.yaml b/.github/workflows/ci.pr.yaml index 254cd72..36c8e2f 100644 --- a/.github/workflows/ci.pr.yaml +++ b/.github/workflows/ci.pr.yaml @@ -24,4 +24,5 @@ jobs: - name: Run actionlint run: /home/runner/go/bin/actionlint yamllint: - uses: parcelLab/ci/.github/workflows/yaml.yaml@v9 + # Local copy, not @v9: a PR must validate its own workflow changes. + uses: ./.github/workflows/yaml.yaml diff --git a/.github/workflows/ci.yaml.yaml b/.github/workflows/ci.yaml.yaml index cf27840..b38ea4c 100644 --- a/.github/workflows/ci.yaml.yaml +++ b/.github/workflows/ci.yaml.yaml @@ -15,4 +15,4 @@ on: workflow_dispatch: jobs: lint: - uses: parcelLab/ci/.github/workflows/yaml.yaml@v9 + uses: ./.github/workflows/yaml.yaml diff --git a/.github/workflows/json.yaml b/.github/workflows/json.yaml index 9f07637..6f581ed 100644 --- a/.github/workflows/json.yaml +++ b/.github/workflows/json.yaml @@ -19,7 +19,9 @@ jobs: steps: - name: Checkout current git repository uses: actions/checkout@v7 - - name: Lint JSON - uses: actionsx/prettier@v3 + - name: Set up node environment + uses: actions/setup-node@v7 with: - args: --check "**/*.json" + node-version: lts/* + - name: Lint JSON + run: npx --yes prettier@3.9.6 --check -- "**/*.json" diff --git a/.github/workflows/yaml.yaml b/.github/workflows/yaml.yaml index 6babe49..7e97283 100644 --- a/.github/workflows/yaml.yaml +++ b/.github/workflows/yaml.yaml @@ -24,14 +24,18 @@ jobs: - name: Checkout current git repository uses: actions/checkout@v7 - - name: Lint all YAML files - uses: actionsx/prettier@v3 - if: ${{ inputs.additional_args == '' }} + - name: Set up node environment + uses: actions/setup-node@v7 with: - args: --check "**/*.{yaml,yml}" + node-version: lts/* - - name: Lint some YAML files - uses: actionsx/prettier@v3 - if: ${{ inputs.additional_args != '' }} - with: - args: --check "**/*.{yaml,yml}" "${{ inputs.additional_args }}" + - name: Lint YAML files + # npx, not npm ci: calling repositories may have no package.json. + env: + ADDITIONAL_ARGS: ${{ inputs.additional_args }} + run: | + # Split additional_args into words, but leave the globs for Prettier + # to interpret rather than letting bash expand them against the repo. + set -f + # shellcheck disable=SC2086 + npx --yes prettier@3.9.6 --check -- "**/*.{yaml,yml}" $ADDITIONAL_ARGS diff --git a/.gitignore b/.gitignore index f78e25c..fdcd0a7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,19 +1,11 @@ -# Mac -.DS_Store - -# Node -node_modules - -# Windows -Thumbs.db - -# Editor +# Directories .idea/ -.vscode +.vscode/ +node_modules/ +tmp/ -# vi -*~ - -# General -log/ +# Files *.log +*~ +.DS_Store +Thumbs.db diff --git a/package-lock.json b/package-lock.json index 3cd044f..8770052 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,7 +14,7 @@ "husky": "^8.0.3", "is-ci": "^3.0.1", "lint-staged": "^13.1.0", - "prettier": "2.8.3" + "prettier": "3.9.6" }, "engines": { "node": ">=v18.8.0" @@ -2231,15 +2231,16 @@ } }, "node_modules/prettier": { - "version": "2.8.3", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.3.tgz", - "integrity": "sha512-tJ/oJ4amDihPoufT5sM0Z1SKEuKay8LfVAMlbbhnnkvt6BUserZylqo2PN+p9KeljLr0OHa2rXHU1T8reeoTrw==", + "version": "3.9.6", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.9.6.tgz", + "integrity": "sha512-OpN0zzVdiaiAhxpuuj5efpIS4sY9j7bY6uR5mnj5yPzGkdkjNKSJeUThPb60Jw29QuAZgA4o+/iB49kFiaBX6g==", "dev": true, + "license": "MIT", "bin": { - "prettier": "bin-prettier.js" + "prettier": "bin/prettier.cjs" }, "engines": { - "node": ">=10.13.0" + "node": ">=14" }, "funding": { "url": "https://github.com/prettier/prettier?sponsor=1" diff --git a/package.json b/package.json index e173a36..48720fa 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ "husky": "^8.0.3", "is-ci": "^3.0.1", "lint-staged": "^13.1.0", - "prettier": "2.8.3" + "prettier": "3.9.6" }, "lint-staged": { "**/*": "prettier --write --ignore-unknown"