Introduce basic build test #540
Workflow file for this run
This file contains hidden or 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: Licence-date-verification | |
| permissions: | |
| contents: read | |
| pull-requests: read | |
| on: | |
| pull_request: | |
| branches: | |
| - master | |
| - v* | |
| env: | |
| EXTENSIONS: "c h cpp py go sh mk spec service" | |
| FILES: "*Makefile" | |
| jobs: | |
| verify-date: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Get changed files | |
| id: changed-files | |
| uses: tj-actions/changed-files@v47.0.0 | |
| with: | |
| files_ignore: '.github/**' | |
| - name: List all changed files | |
| run: | | |
| files_to_check=(${{ steps.changed-files.outputs.added_files }}) | |
| files_to_check+=(${{ steps.changed-files.outputs.modified_files }}) | |
| for file in ${files_to_check[@]}; do | |
| for file_in_list in $FILES; do | |
| if [[ "$file" == $file_in_list ]]; then | |
| .github/verify_header.sh "$file" | |
| continue 2 | |
| fi | |
| done | |
| extension=${file##*.} | |
| if [[ "$EXTENSIONS" =~ $extension ]]; then | |
| .github/verify_header.sh "$file" | |
| fi | |
| done |