Skip to content
This repository has been archived by the owner on May 10, 2024. It is now read-only.

Merge pull request #18 from odroe/renovate/parrot-0.x #107

Merge pull request #18 from odroe/renovate/parrot-0.x

Merge pull request #18 from odroe/renovate/parrot-0.x #107

# Check that each package/*/LICENSE is consistent with LICENSE.
#
# - If it does not exist, make a copy of the LICENSE.
# - If there is an inconsistency, overwrite with LICENSE.
name: License Consistency
on: [push, pull_request]
jobs:
check:
runs-on: ubuntu-latest
outputs:
result: ${{ steps.check.outputs.result }}
steps:
- uses: actions/checkout@v4
- uses: dart-lang/[email protected]
- name: Install dependencies
run: dart pub get
- name: Fix license consistency
run: dart run tools/bin.dart license-consistency -l LICENSE -d packages
- name: Check for fix license inconsistency
id: check
run: |
if [[ -n $(git status -s) ]]; then
echo "result=failure" >> $GITHUB_OUTPUT
else
echo "result=success" >> $GITHUB_OUTPUT
fi
fix:
needs: check
if: needs.check.outputs.result == 'failure'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dart-lang/[email protected]
- name: Install dependencies
run: dart pub get
- name: Fix license consistency
run: dart run tools/bin.dart license-consistency -l LICENSE -d packages
- name: Commit changes
run: |
git config --local user.email "${{ github.actor }}@users.noreply.github.com"
git config --local user.name "${{ github.actor }}"
git add .
git commit -m "fix(license): Fix license inconsistency" -s
- name: Push changes
run: git push