Copyright #2
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: Copyright | |
| run-name: Copyright | |
| description: Updates license copyright year annually. | |
| permissions: {} | |
| on: | |
| schedule: | |
| - cron: 0 0 1 1 * | |
| workflow_dispatch: | |
| jobs: | |
| license-copyright: | |
| name: Update license copyright year | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| steps: | |
| - name: Create GitHub app token | |
| id: github-app-token | |
| uses: actions/create-github-app-token@v2 | |
| with: | |
| app-id: ${{ secrets.CONTINUOUS_INTEGRATION_BOT_ID }} | |
| private-key: ${{ secrets.CONTINUOUS_INTEGRATION_BOT_KEY }} | |
| permission-contents: write | |
| permission-pull-requests: write | |
| - name: Checkout license file | |
| uses: actions/checkout@v5 | |
| with: | |
| token: ${{ steps.github-app-token.outputs.token }} | |
| sparse-checkout: LICENSE | |
| persist-credentials: true | |
| sparse-checkout-cone-mode: false | |
| - name: Create pull request to update license copyright year | |
| id: update-license | |
| uses: FantasticFiasco/action-update-license-year@d837fc83ecb71196807bdf3854208f556e66f6ed | |
| with: | |
| token: ${{ steps.github-app-token.outputs.token }} | |
| labels: bot | |
| prTitle: Update license copyright year to {{currentYear}} | |
| branchName: github-action/update-license-year-to-{{currentYear}} | |
| commitTitle: 'docs: update license copyright year' | |
| commitAuthorName: github-actions[bot] | |
| commitAuthorEmail: github-actions[bot]@users.noreply.github.com | |
| - name: Merge pull request | |
| if: ${{ steps.update-license.outputs.pullRequestNumber != '' }} | |
| run: gh pr merge $PULL_REQUEST_NUMBER --admin --merge --delete-branch | |
| env: | |
| GITHUB_TOKEN: ${{ steps.github-app-token.outputs.token }} | |
| PULL_REQUEST_NUMBER: ${{ steps.update-license.outputs.pullRequestNumber }} | |
| concurrency: | |
| group: copyright | |
| cancel-in-progress: true |