Skip to content

Commit 858da21

Browse files
authored
Merge pull request #14 from rucoder/rucoder/spdx-check
Add GH action to check SPDX license header and copyright
2 parents 1be6f50 + adc9f4d commit 858da21

File tree

2 files changed

+39
-22
lines changed

2 files changed

+39
-22
lines changed

.github/workflows/pr.yaml

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Pull Request Workflow
2+
on:
3+
push:
4+
branches: ["main"]
5+
pull_request:
6+
types: [opened, synchronize, reopened]
7+
branches: ["main"]
8+
9+
env:
10+
CARGO_TERM_COLOR: always
11+
12+
jobs:
13+
check-spdx-headers:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: checkout
17+
uses: actions/checkout@v4
18+
- name: Get files for PR
19+
uses: tj-actions/changed-files@v44
20+
id: changed-files
21+
with:
22+
separator: "," # Space-separated output
23+
- name: Verify SPDX headers
24+
uses: rucoder/spdx@v1
25+
with:
26+
licenses: |-
27+
Apache-2.0
28+
files: ${{ steps.changed-files.outputs.all_changed_files }}
29+
copyright: "Zededa, Inc."
30+
build:
31+
runs-on: ubuntu-latest
32+
needs: check-spdx-headers
33+
34+
steps:
35+
- uses: actions/checkout@v4
36+
- name: Build
37+
run: cargo build --verbose
38+
- name: Run tests
39+
run: cargo test --verbose

.github/workflows/rust.yml

-22
This file was deleted.

0 commit comments

Comments
 (0)