feat: add checkpoint-sync #14
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: Check License | |
| on: | |
| workflow_dispatch: | |
| pull_request: | |
| branches: ["**"] | |
| paths: | |
| - "**/Cargo.toml" | |
| - "LICENSE*" | |
| - ".github/workflows/pr_lint_license.yaml" | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
| cancel-in-progress: true | |
| jobs: | |
| check-license: | |
| name: Verify License | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Check LICENSE file exists | |
| run: | | |
| if [ ! -f LICENSE ]; then | |
| echo "::error::LICENSE file is missing" | |
| exit 1 | |
| fi | |
| echo "License file present" | |
| - name: Check all packages reference LICENSE | |
| run: | | |
| MISSING=$(cargo metadata --format-version 1 --no-deps 2>/dev/null | \ | |
| jq -r '.packages[] | select(.license != "LICENSE") | .name') | |
| if [ -n "$MISSING" ]; then | |
| echo "::error::The following packages do not reference 'LICENSE':" | |
| echo "$MISSING" | |
| echo "" | |
| echo "Ensure each Cargo.toml has: license = \"LICENSE\"" | |
| exit 1 | |
| fi | |
| echo "All packages correctly reference LICENSE file" |