Skip to content

Commit

Permalink
fix #10 compose action
Browse files Browse the repository at this point in the history
  • Loading branch information
lucemia committed Jun 14, 2024
1 parent 7870fe5 commit ec73cfd
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 12 deletions.
17 changes: 5 additions & 12 deletions .github/workflows/pr-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,10 @@ jobs:
runs-on: ubuntu-latest

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

- name: Install pr-lint
run: pip install pr-lint

- name: Run Commitlint on PR title
run: pr-lint
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_REPOSITORY: ${{ github.repository }}
PR_NUMBER: ${{ github.event.number }}
30 changes: 30 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: PR Lint
description: A custom action to run pr-lint on PR titles
author: lucemia
inputs:
github_token:
description: "GitHub token"
required: true
github_repository:
description: "GitHub repository"
required: true
pr_number:
description: "Pull request number"
required: true
runs:
using: "composite"
steps:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.x"

- name: Install pr-lint
run: pip install poetry && poetry install

- name: Run pr-lint on PR title
run: poetry run pr-lint
env:
GITHUB_TOKEN: ${{ inputs.github_token }}
GITHUB_REPOSITORY: ${{ inputs.github_repository }}
PR_NUMBER: ${{ inputs.pr_number }}

0 comments on commit ec73cfd

Please sign in to comment.