Skip to content

Update copyright

Update copyright #3

name: Update copyright
on:
schedule:
- cron: "0 3 1 1 *"
workflow_dispatch:
jobs:
update-copyright:
name: Update copyright
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
extensions: bz2, Phar
ini-values: phar.readonly=0
tools: composer
- name: Get Composer cache directory
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: Cache dependencies
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: "composer-${{ hashFiles('**/composer.json') }}"
restore-keys: "composer-"
- name: Install dependencies
run: composer update && composer install
- name: Run composer update-copyright script
run: composer update-copyright
- name: Create pull request
uses: peter-evans/create-pull-request@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: Update copyright year
title: Update copyright year
body: |
Update copyright year
- Auto-generated by [create-pull-request][1]
[1]: https://github.com/peter-evans/create-pull-request
branch: update-copyright/update
branch-suffix: timestamp
delete-branch: true