Skip to content

Commit cbfca5c

Browse files
committed
ci: Reuse workflow for lint
1 parent 4b8bcd7 commit cbfca5c

File tree

1 file changed

+4
-32
lines changed

1 file changed

+4
-32
lines changed

.github/workflows/lint.yml

Lines changed: 4 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,7 @@
11
name: Lint
22
on: [push, pull_request]
3-
env:
4-
BASEDIR: https://raw.githubusercontent.com/open-contracting/standard-maintenance-scripts/main
53
jobs:
6-
build:
7-
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
8-
runs-on: ubuntu-latest
9-
env:
10-
PAT: ${{ secrets.PAT }}
11-
steps:
12-
- uses: actions/checkout@v4
13-
with:
14-
token: ${{ secrets.PAT || github.token }}
15-
- uses: actions/setup-python@v5
16-
with:
17-
python-version: '3.11'
18-
cache: pip
19-
cache-dependency-path: '**/requirements*.txt'
20-
- id: changed-files
21-
uses: tj-actions/changed-files@v45
22-
- uses: pre-commit/action@v3.0.1
23-
continue-on-error: true
24-
with:
25-
extra_args: pip-compile --files ${{ steps.changed-files.outputs.all_changed_files }}
26-
- if: ${{ env.PAT }}
27-
uses: stefanzweifel/git-auto-commit-action@v5
28-
with:
29-
commit_message: '[github-actions] pre-commit autoupdate'
30-
- shell: bash
31-
run: curl -s -S --retry 3 $BASEDIR/tests/install.sh | bash -
32-
- shell: bash
33-
run: curl -s -S --retry 3 $BASEDIR/tests/script.sh | bash -
34-
- run: pip install -r requirements_dev.txt
35-
- run: pytest /tmp/test_requirements.py
4+
lint:
5+
uses: open-contracting/.github/.github/workflows/lint.yml@main
6+
permissions:
7+
contents: write

0 commit comments

Comments
 (0)