on: pull_request: push: branches: [main] jobs: lictool: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 if: ${{ github.event_name != 'pull_request' }} - name: Checkout pull request uses: actions/checkout@v4 if: ${{ github.event_name == 'pull_request' }} with: repository: ${{ github.event.pull_request.head.repo.full_name }} ref: ${{ github.event.pull_request.head.ref }} - name: Set up Python 3 uses: actions/setup-python@v4 with: python-version: 3.x - name: Set git author to @actions uses: fregante/setup-git-user@v2 - name: Install lictool run: pip install git+https://github.com/emzeat/mz-lictools@v2.7.0 - name: Run lictool run: lictool - name: Commit and push uses: EndBug/add-and-commit@v9 with: default_author: github_actions message: "[ci] update license header" push: true fetch: false