Skip to content

feat: store licenses #1161

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
73 changes: 73 additions & 0 deletions .github/workflows/sync-license-data.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: Sync SPDX License Data

on:
schedule:
- cron: "0 6 1 * *"
workflow_dispatch:

jobs:
sync-license-data:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Shallow clone SPDX license-list-data
run: |
git clone --depth 1 --filter=blob:none --no-checkout https://github.com/spdx/license-list-data.git spdx-temp

- name: Initialize SPDX license-list-data
working-directory: spdx-temp
run: |
git sparse-checkout init --cone
git sparse-checkout set json/details
git checkout main

- name: Copy license data
run: |
# Remove existing license data
rm -rf api/license-list-data/json/details

# Copy the new license data
mkdir -p api/license-list-data/json
cp -r spdx-temp/json/details api/license-list-data/json/

# Clean up temp directory
rm -rf spdx-temp

- name: Check for changes
id: check-changes
run: |
git add api/license-list-data/json/details
if git diff --cached --quiet; then
echo "changes=false" >> $GITHUB_OUTPUT
else
echo "changes=true" >> $GITHUB_OUTPUT
fi

- name: Create Pull Request
if: steps.check-changes.outputs.changes == 'true'
uses: peter-evans/create-pull-request@v5
with:
commit-message: |
feat: update SPDX license data

Automated update of SPDX license data from upstream repository.
title: "feat: update SPDX license data"
body: |
## Summary

This PR updates the SPDX license data with the latest version from the upstream repository.

### Changes
- Updated license data in `api/license-list-data/json/details/`
- Synced with latest SPDX license-list-data repository

### Automation
This PR was created automatically by the monthly sync workflow.
branch: update-spdx-license-data
delete-branch: true
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,6 @@ target/
frontend/node_modules
frontend/dist

.gcs
.gcs

.idea
127 changes: 125 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading