Skip to content

Commit 9f37a05

Browse files
authored
fix #10 compose action @lucemia (#11)
* fix #10 compose action * add shell: bash * fix
1 parent 7870fe5 commit 9f37a05

File tree

2 files changed

+39
-12
lines changed

2 files changed

+39
-12
lines changed

.github/workflows/pr-lint.yml

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,10 @@ jobs:
99
runs-on: ubuntu-latest
1010

1111
steps:
12-
- name: Set up Python
13-
uses: actions/setup-python@v5
12+
- id: pr-lint
13+
uses: livingbio/pr-lint@fix-10-compose-action
1414
with:
15-
python-version: "3.x"
15+
github_token: ${{ secrets.GITHUB_TOKEN }}
16+
github_repository: ${{ github.repository }}
17+
pr_number: ${{ github.event.number }}
1618

17-
- name: Install pr-lint
18-
run: pip install pr-lint
19-
20-
- name: Run Commitlint on PR title
21-
run: pr-lint
22-
env:
23-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
24-
GITHUB_REPOSITORY: ${{ github.repository }}
25-
PR_NUMBER: ${{ github.event.number }}

action.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: PR Lint
2+
description: A custom action to run pr-lint on PR titles
3+
author: lucemia
4+
inputs:
5+
github_token:
6+
description: "GitHub token"
7+
required: true
8+
github_repository:
9+
description: "GitHub repository"
10+
required: true
11+
pr_number:
12+
description: "Pull request number"
13+
required: true
14+
runs:
15+
using: "composite"
16+
steps:
17+
- name: Set up Python
18+
uses: actions/setup-python@v5
19+
with:
20+
python-version: "3.x"
21+
22+
- name: Install pr-lint
23+
run: pip install poetry && poetry install
24+
shell: bash
25+
working-directory: ${{ github.action_path }}
26+
27+
- name: Run pr-lint on PR title
28+
run: poetry run pr-lint
29+
env:
30+
GITHUB_TOKEN: ${{ inputs.github_token }}
31+
GITHUB_REPOSITORY: ${{ inputs.github_repository }}
32+
PR_NUMBER: ${{ inputs.pr_number }}
33+
shell: bash
34+
working-directory: ${{ github.action_path }}

0 commit comments

Comments
 (0)