Skip to content

Commit 62d6225

Browse files
committed
use bash instead
1 parent 2a336e6 commit 62d6225

File tree

1 file changed

+4
-16
lines changed

1 file changed

+4
-16
lines changed

.github/workflows/pre-commit.yml

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -55,25 +55,15 @@ jobs:
5555
persist-credentials: false
5656
repository: cpp-linter/.github
5757
path: org-repo
58-
- name: Setup Nu shell
59-
uses: hustcer/setup-nu@985d59ec83ae3e3418f9d36471cda38b9d8b9879 # v3.20
60-
with:
61-
version: ${{ vars.NUSHELL_VERSION || '*' }}
6258
- name: Get PR title
63-
# working-directory: project-repo
64-
shell: nu {0}
6559
id: get-title
6660
env:
6761
GH_REPO: ${{ github.repository }}
6862
GH_TOKEN: ${{ github.token }}
6963
PR_NUMBER: ${{ github.event.pull_request.number }}
7064
run: |-
71-
let pr_title = (
72-
(^gh pr view $env.PR_NUMBER --repo $env.GH_REPO --json "title")
73-
| from json
74-
| get title
75-
)
76-
$"title=($pr_title)\n" | save --append $env.GITHUB_OUTPUT
65+
pr_title=$(gh pr view "${PR_NUMBER}" --repo "${GH_REPO}" --json "title" -q ".title")
66+
echo "title=${pr_title}" >> "${GITHUB_OUTPUT}"
7767
- run: rustup update --no-self-update
7868
- name: Install cargo-binstall
7969
uses: cargo-bins/cargo-binstall@2bb61346d075e720d4c3da92f23b6d612d5a7543 # v1.15.3
@@ -85,14 +75,12 @@ jobs:
8575
env:
8676
PR_TITLE: "${{ steps.get-title.outputs.title }}"
8777
COMMITTED_CONFIG: ${{ github.workspace }}/org-repo/.github/committed.toml
88-
shell: nu {0}
89-
run: $env.PR_TITLE | ^committed --config $env.COMMITTED_CONFIG --commit-file -
78+
run: echo "${PR_TITLE}" | committed --config "${COMMITTED_CONFIG}" --commit-file -
9079
- uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
9180
with:
9281
node-version: latest
9382
- name: spell check
9483
working-directory: project-repo
95-
shell: nu {0}
9684
env:
9785
PR_TITLE: "${{ steps.get-title.outputs.title }}"
98-
run: $env.PR_TITLE | ^npx cspell-cli lint stdin
86+
run: echo "${PR_TITLE}" | npx cspell-cli lint stdin

0 commit comments

Comments
 (0)