-
-
Notifications
You must be signed in to change notification settings - Fork 6
73 lines (56 loc) · 2.22 KB
/
update.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
# https://help.github.com/en/categories/automating-your-workflow-with-github-actions
name: "Update"
on: # yamllint disable-line rule:truthy
schedule:
- cron: "0 9 * * *"
jobs:
schema:
name: "Schema"
runs-on: "ubuntu-latest"
strategy:
matrix:
php-version:
- "7.4"
dependencies:
- "locked"
steps:
- name: "Checkout"
uses: "actions/checkout@v4.2.2"
- name: "Set up PHP"
uses: "shivammathur/setup-php@2.31.1"
with:
coverage: "none"
php-version: "${{ matrix.php-version }}"
- name: "Download schema"
run: "wget --output-document=test/Fixture/Vendor/Composer/schema.json https://getcomposer.org/schema.json"
- name: "Show diff"
run: "git diff test/Fixture/Vendor/Composer/schema.json"
- name: "Determine composer root version"
uses: "ergebnis/.github/actions/composer/determine-root-version@1.9.2"
- name: "Determine composer cache directory"
uses: "ergebnis/.github/actions/composer/determine-cache-directory@1.9.2"
- name: "Cache dependencies installed with composer"
uses: "actions/cache@v4.1.2"
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: "ergebnis/.github/actions/composer/install@1.9.2"
with:
dependencies: "${{ matrix.dependencies }}"
- name: "Laxify schema"
run: "php bin/laxify-schema.php"
- name: "Open pull request updating schema"
uses: "gr2m/create-or-update-pull-request-action@v1"
with:
author: "ergebnis-bot <bot@ergebn.is>"
branch: "feature/schema"
body: |
This PR
- [x] updates `schema.json`
commit-message: "Enhancement: Update schema.json"
path: "test/Fixture/Vendor/Composer/"
title: "Enhancement: Update `schema.json`"
env:
GITHUB_TOKEN: "${{ secrets.ERGEBNIS_BOT_TOKEN }}"