Skip to content

Lang consistency check #38

Lang consistency check

Lang consistency check #38

name: Verify source branch name
on:
pull_request:
branches:
- '**'
jobs:
verify-source-branch:
runs-on: ubuntu-latest
env:
BRANCH_NAME: ${{ github.head_ref }} # Set the variables used by the verify_branch script
VALIDATE_ALL: "True"
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Print source branch name
run: |
echo "The source branch of the PR is: $BRANCH_NAME"
- name: Get latest push changes
id: changed-files
uses: tj-actions/changed-files@v45
with:
since_last_remote_commit: true
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install Pre-commit
run: pip install pre-commit
- name: Install dependencies
run: pip install git+https://github.com/hed-standard/hed-python.git@develop
- name: Run pre-commit on changed files
run: |
if [ -n "${{ steps.changed-files.outputs.all_changed_files }}" ]; then
pre-commit run --files ${{ steps.changed-files.outputs.all_changed_files }}
else
echo "No files have changed, skipping pre-commit."
fi