generated from hydephp/hyde
-
-
Notifications
You must be signed in to change notification settings - Fork 3
41 lines (33 loc) · 1.02 KB
/
update-community-files.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
name: Update Community Files
on:
schedule:
- cron: '0 0 * * 0' # Run at midnight every Sunday
workflow_dispatch: # Allow manual trigger
jobs:
update-files:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v4
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
- name: Install dependencies
run: composer install --prefer-dist --no-progress
- name: Download community files
run: php hyde download-community-files
- name: Check for changes
id: git-check
run: |
git diff --quiet || echo "has_changes=true" >> $GITHUB_OUTPUT
- name: Commit changes
if: steps.git-check.outputs.has_changes == 'true'
uses: EndBug/add-and-commit@v9
with:
add: '_pages'
message: 'Update community files'
default_author: github_actions