Skip to content

Readme.md

Readme.md #35

Workflow file for this run

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

Check failure on line 32 in .github/workflows/check_heards.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/check_heards.yml

Invalid workflow file

You have an error in your yaml syntax on line 32
with:
python-version: '3.7.8'
- name: execute py script
run:
python .github/workflows/Scripts/checkImport.py