Merge pull request #220 from AppleCommander/dependabot/gradle/gradle-… #98
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
| # This is a crude license header check. The ones I tested were susceptible to whitespace differences | |
| # and I never got them to work. My primary goal is to ensure the headers exist, so this suffices. | |
| name: Verify AppleCommander has a license header | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| tags: | |
| - '*' | |
| pull_request: | |
| branches: [ "main" ] | |
| permissions: | |
| contents: read | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Look for license phrase | |
| run: | | |
| outfile=$(mktemp) | |
| find . -name "*.java" -not -name "Sleak.java" | xargs grep -L "GNU General Public License" > ${outfile} | |
| if [ -s "${outfile}" ] | |
| then | |
| echo "License headers missing on the following files:" | |
| cat ${outfile} | |
| exit 1 | |
| else | |
| echo "License headers appear to be valid!" | |
| fi |