Update to 6.15.3 #31
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: check headers | ||
on: | ||
pull_request: | ||
types: [opened, synchronize] | ||
branches: | ||
- 'master' | ||
jobs: | ||
conditional_job_check_files: | ||
runs-on: 'ubuntu-20.04' | ||
outputs: | ||
docs_changed: ${{ steps.check_file_changed.outputs.docs_changed }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 5 | ||
- shell: pwsh | ||
id: check_file_changed | ||
run: | | ||
# Diff HEAD with the previous commit | ||
$diff = git diff --name-only HEAD^ HEAD | ||
$SourceDiff = $diff | Where-Object {$_ -match '.sh$' } | ||
$HasDiff = $SourceDiff.Length -gt 0 | ||
Write-Host "name=docs_changed::$HasDiff" >>$GITHUB_OUTPUT | ||
# Run the job only with "docs_changed" equals "True" | ||
conditional_job: | ||
runs-on: 'ubuntu-20.04' | ||
needs: [ conditional_job_check_files ] | ||
if: needs.conditional_job_check_files.outputs.docs_changed == 'True' | ||
steps: | ||
- name: setup python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.7.8' | ||
- name: execute py script | ||
run: | ||
python .github/workflows/Scripts/checkImport.py |