Skip to content

Commit

Permalink
chore: update license year once (#472)
Browse files Browse the repository at this point in the history
  • Loading branch information
paulbalandan authored Jan 7, 2025
1 parent 8bc9c07 commit 19502ed
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 147 deletions.
35 changes: 0 additions & 35 deletions .github/scripts/update-license

This file was deleted.

58 changes: 0 additions & 58 deletions .github/workflows/auto-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,15 @@ on:
- Language/**
- tests/**
- .github/workflows/auto-review.yml
- LICENSE
pull_request:
branches:
- develop
paths:
- Language/**
- tests/**
- .github/workflows/auto-review.yml
- LICENSE

jobs:

code:
name: Automatic Review on Code [PHP ${{ matrix.php-version }}]
runs-on: ubuntu-22.04
Expand Down Expand Up @@ -64,58 +61,3 @@ jobs:

- name: Run Automatic Review Test Suite
run: vendor/bin/phpunit --color=always --group=auto-review

license:
name: Automatic Review on License
runs-on: ubuntu-22.04

permissions:
pull-requests: write
contents: write

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
extensions: intl, mbstring
coverage: none
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Get composer cache directory
run: echo "COMPOSER_CACHE_FILES_DIR=$(composer config cache-files-dir)" >> $GITHUB_ENV

- name: Cache composer dependencies
uses: actions/cache@v4
with:
path: ${{ env.COMPOSER_CACHE_FILES_DIR }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: ${{ runner.os }}-composer-

- name: Install dependencies
run: composer update --ansi

- name: Run Automatic Review Test Suite
run: vendor/bin/phpunit --color=always --group=license-review

- name: Update the License Year
if: failure() && github.event_name == 'push'
run: |
php .github/scripts/update-license
echo "LICENSE_UPDATED=true" >> $GITHUB_OUTPUT
id: license

- name: Create Pull Request for Updated License
if: failure() && steps.license.outputs.LICENSE_UPDATED == 'true' && github.event_name == 'push'
uses: peter-evans/create-pull-request@v7
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: 'chore: update license year'
branch: update-license-year
delete-branch: true
base: develop
title: 'chore: update license year'
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
The MIT License (MIT)

Copyright (c) 2014-2019 British Columbia Institute of Technology
Copyright (c) 2019-2024 CodeIgniter Foundation
Copyright (c) 2019-present CodeIgniter Foundation

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
53 changes: 0 additions & 53 deletions tests/AutoReview/LicenseTest.php

This file was deleted.

0 comments on commit 19502ed

Please sign in to comment.