Files
ess-helm/.github/workflows/licensing.yml
T
dependabot[bot] 70b1263e7c Bump the minor-and-patches group with 2 updates
Bumps the minor-and-patches group with 2 updates: [actions/checkout](https://github.com/actions/checkout) and [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request).


Updates `actions/checkout` from 6.0.1 to 6.0.2
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/8e8c483db84b4bee98b60c0593521ed34d9990e8...de0fac2e4500dabe0009e67214ff5f5447ce83dd)

Updates `peter-evans/create-pull-request` from 8.0.0 to 8.1.0
- [Release notes](https://github.com/peter-evans/create-pull-request/releases)
- [Commits](https://github.com/peter-evans/create-pull-request/compare/98357b18bf14b5342f975ff684046ec3b2a07725...c0f553fe549906ede9cf27b5156039d195d2ece0)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: 6.0.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: minor-and-patches
- dependency-name: peter-evans/create-pull-request
  dependency-version: 8.1.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: minor-and-patches
...

Signed-off-by: dependabot[bot] <[email protected]>
2026-01-26 23:23:25 +00:00

71 lines
2.0 KiB
YAML

# Copyright 2024-2025 New Vector Ltd
# Copyright 2025 Element Creations Ltd
#
# SPDX-License-Identifier: AGPL-3.0-only
name: Licensing & Copyright checks
on:
pull_request:
push:
branches:
- main
- 'maintenance/*'
workflow_dispatch:
permissions:
contents: read
jobs:
reuse-licensing-and-copyright-checks:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
fetch-depth: 0
- uses: matrix-org/setup-python-poetry@5bbf6603c5c930615ec8a29f1b5d7d258d905aa4 # v2
with:
python-version: "3.x"
- name: Load poetry path
run: |
echo "$(poetry env info -p)/bin" >> "${GITHUB_PATH}"
- name: reuse-lint
run: |
git config --global --add safe.directory "$GITHUB_WORKSPACE"
reuse --version
reuse lint
- name: Generate SPDX
run: |
git config --global --add safe.directory "$GITHUB_WORKSPACE"
reuse --version
reuse spdx > "$RUNNER_TEMP/reuse.spdx"
- name: SPDX checks
run: |
./scripts/spdx_check_all_files.py "$RUNNER_TEMP/reuse.spdx"
# `reuse spdx` will coalesce multiple identical copyright headerts
if grep -Pzlr '(?s)Copyright \d{4}(-\d{4})? Element Creations Ltd\n.*Copyright \d{4}(-\d{4})? Element Creations Ltd' .; then
echo "Some files had more than 1 Element Creations Ltd header"
exit 1
fi
- name: Copyright dates
if: ${{ github.event_name == 'pull_request' }}
env:
BASE_REF: ${{ github.event.pull_request.base.sha }}
HEAD_REF: ${{ github.event.pull_request.head.sha }}
run: |
echo "Comparing $BASE_REF against current branch HEAD $(git rev-parse "$HEAD_REF")"
# Get the list of changed files
changed_files=$(git diff --diff-filter=rd --name-only "$BASE_REF...$HEAD_REF")
echo "Changed files to verify : $changed_files"
echo "$changed_files" | xargs ./scripts/spdx_check_changed_file.py "$RUNNER_TEMP/reuse.spdx"