35 lines
905 B
YAML
35 lines
905 B
YAML
name: Porting record
|
|
|
|
on:
|
|
workflow_call:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
validate:
|
|
name: Porting record
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
path: device
|
|
fetch-depth: 0
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
repository: UniXNU/UniXNU
|
|
ref: main
|
|
path: tools
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: '3.12'
|
|
- name: Validate structure and changed areas
|
|
env:
|
|
BASE: ${{ github.event.pull_request.base.sha || github.event.before }}
|
|
DEFAULT_BRANCH: ${{ github.event.repository.default_branch }}
|
|
run: |
|
|
if [[ -z "$BASE" || "$BASE" =~ ^0+$ ]]; then
|
|
BASE="refs/remotes/origin/$DEFAULT_BRANCH"
|
|
fi
|
|
python3 tools/scripts/porting-record.py check --device device --base "$BASE"
|