85 lines (67 loc) 路 2.69 KB
/
renew.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# https://docs.github.com/en/actions
name: "Renew"
on: # yamllint disable-line rule:truthy
schedule:
- cron: "1 0 1 1 *"
env:
ERGEBNIS_BOT_EMAIL: "bot@ergebn.is"
ERGEBNIS_BOT_NAME: "ergebnis-bot"
PHP_EXTENSIONS: "mbstring"
PHP_INI_VALUES: "memory_limit=-1, phar.readonly=0"
jobs:
license:
name: "License"
runs-on: "ubuntu-latest"
strategy:
matrix:
php-version:
- "7.2"
dependencies:
- "locked"
steps:
- name: "Checkout"
uses: "actions/checkout@v2.3.3"
- name: "Install PHP with extensions"
uses: "shivammathur/setup-php@2.6.0"
with:
coverage: "none"
extensions: "${{ env.PHP_EXTENSIONS }}"
ini-values: "${{ env.PHP_INI_VALUES }}"
php-version: "${{ matrix.php-version }}"
- name: "Validate composer.json and composer.lock"
run: "composer validate --strict"
- name: "Determine composer cache directory"
uses: "./.github/actions/composer/composer/determine-cache-directory"
- name: "Cache dependencies installed with composer"
uses: "actions/cache@v2.1.1"
with:
path: "${{ env.COMPOSER_CACHE_DIR }}"
key: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('composer.lock') }}"
restore-keys: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-"
- name: "Install ${{ matrix.dependencies }} dependencies with composer"
uses: "./.github/actions/composer/composer/install"
with:
dependencies: "${{ matrix.dependencies }}"
- name: "Create cache directory for friendsofphp/php-cs-fixer"
run: "mkdir -p .build/php-cs-fixer"
- name: "Cache cache directory for friendsofphp/php-cs-fixer"
uses: "actions/cache@v2.1.1"
with:
path: ".build/php-cs-fixer"
key: "php-${{ matrix.php-version }}-php-cs-fixer-${{ github.sha }}"
restore-keys: "php-${{ matrix.php-version }}-php-cs-fixer-"
- name: "Run friendsofphp/php-cs-fixer"
run: "vendor/bin/php-cs-fixer fix --config=.php_cs --diff --diff-format=udiff --dry-run --verbose"
- name: "Open pull request updating license year"
uses: "gr2m/create-or-update-pull-request-action@v1.3.0"
with:
author: "${{ env.ERGEBNIS_BOT_NAME }} <${{ env.ERGEBNIS_BOT_EMAIL }}>"
branch: "feature/license-year"
body: |
This PR
* [x] updates the license year
commit-message: "Enhancement: Update license year"
path: "."
title: "Enhancement: Update license year"
env:
GITHUB_TOKEN: "${{ secrets.ERGEBNIS_BOT_TOKEN }}"