Skip to content

Commit

Permalink
ci: use pull-request sha directly in basics action
Browse files Browse the repository at this point in the history
  • Loading branch information
drink7036290 committed Dec 29, 2024
1 parent a2d0b2d commit 6d8117b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
8 changes: 2 additions & 6 deletions .github/actions/basics/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ runs:

- name: Run prefligit
env:
GITHUB_BASE_SHA: ${{ inputs.GITHUB_BASE_SHA }}
GITHUB_BASE_SHA: ${{ github.event.pull_request.base.sha || '' }}
shell: bash
run: |
prefligit -v run --all-files
Expand All @@ -104,7 +104,7 @@ runs:

- name: Run pre-commit
env:
GITHUB_BASE_SHA: ${{ inputs.GITHUB_BASE_SHA }}
GITHUB_BASE_SHA: ${{ github.event.pull_request.base.sha || '' }}
shell: bash
run: |
time python3 -m venv venv
Expand All @@ -130,7 +130,3 @@ inputs:
description: "Rust nightly toolchain version"
required: false
default: "nightly"
GITHUB_BASE_SHA:
description: "The base SHA of the pull request, if any"
required: false
default: ""
2 changes: 0 additions & 2 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ defaults:
jobs:
basics:
runs-on: ubuntu-latest
env:
GITHUB_BASE_SHA: ${{ github.event.pull_request.base.sha || '' }}
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/basics
Expand Down

0 comments on commit 6d8117b

Please sign in to comment.