-
-
Notifications
You must be signed in to change notification settings - Fork 197
100 lines (85 loc) · 2.85 KB
/
manifest.yml
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
name: Manifest
on:
push:
tags:
- '*'
workflow_dispatch:
jobs:
updateManifest:
name: Update manifest
runs-on: ubuntu-latest
env:
phpVersion: '8.1'
extensions: curl, fileinfo, gd, mbstring, openssl, pdo, pdo_sqlite, sqlite3, xml, zip
key: winter-cms-cache-develop
steps:
- name: Cancel previous incomplete runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- name: Checkout changes
uses: actions/checkout@v3
- name: Setup extension cache
id: extcache
uses: shivammathur/cache-extensions@v1
with:
php-version: ${{ env.phpVersion }}
extensions: ${{ env.extensions }}
key: ${{ env.key }}
- name: Cache extensions
uses: actions/cache@v3
with:
path: ${{ steps.extcache.outputs.dir }}
key: ${{ steps.extcache.outputs.key }}
restore-keys: ${{ steps.extcache.outputs.key }}
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ env.phpVersion }}
extensions: ${{ env.extensions }}
- name: Setup dependency cache
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: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: ${{ runner.os }}-composer-
- name: Install Composer dependencies
run: composer install --no-interaction --no-progress --no-scripts
- name: Download manifest
run: wget -O builds.json https://github.com/wintercms/meta/raw/master/manifest/builds.json
- name: Run manifest
run: php artisan winter:manifest builds.json
- name: Create artifact
uses: actions/upload-artifact@v3
with:
name: winter-manifest
path: builds.json
commitManifest:
name: Commit manifest
runs-on: ubuntu-latest
needs: updateManifest
steps:
- name: Cancel previous incomplete runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- name: Checkout changes
uses: actions/checkout@v3
with:
repository: wintercms/meta
ref: master
token: ${{ secrets.WINTER_BOT_TOKEN }}
- name: Download artifact
uses: actions/download-artifact@v3
with:
name: winter-manifest
path: manifest
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Update manifest
commit_user_name: Winter Bot
commit_user_email: [email protected]