Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix #10 compose action @lucemia #11

Merged
merged 3 commits into from
Jun 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 }}
34 changes: 34 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
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
shell: bash
working-directory: ${{ github.action_path }}

- 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 }}
shell: bash
working-directory: ${{ github.action_path }}
Loading