ocf/.github/workflows/pullrequest.yml
dependabot[bot] ddb8dcaee2
build(deps): bump tj-actions/changed-files in /.github/workflows
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files) from 18.2 to 41.
- [Release notes](https://github.com/tj-actions/changed-files/releases)
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md)
- [Commits](https://github.com/tj-actions/changed-files/compare/v18.2...v41)

---
updated-dependencies:
- dependency-name: tj-actions/changed-files
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-02 16:44:24 +00:00

41 lines
1.1 KiB
YAML

name: Licence-date-verification
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@v2.1.0
with:
fetch-depth: 0
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v41
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