Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automated updates #35

Merged
merged 6 commits into from
Apr 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 70 additions & 0 deletions .github/workflows/auto-update.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: Auto Update

on:
schedule:
- cron: '0 0 * * *'

defaults:
run:
shell: bash

jobs:
test:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2
with:
ssh-key: ${{ secrets.SSH_PRIVATE_KEY }}

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
coverage: 'none'
extensions: 'json,xml,xsl'
ini-values: 'memory_limit=-1'
php-version: '8.0'
tools: pecl

- name: Display versions
run: |
php -r 'foreach (get_loaded_extensions() as $extension) echo $extension . " " . phpversion($extension) . PHP_EOL;'
php -i

- name: Validate composer.json
run: composer validate --strict

- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v2
with:
path: vendor
key: 8.0-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
8.0-composer-

- name: Install dependencies
run: composer install --prefer-dist --no-progress

- name: Build files
run: composer run-script build

- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
with:
commit-message: Update resources from Feather icons
branch: automated/feather-update
delete-branch: true
title: '[AUTO] Feather Update'
body: |
Updated resources built based on Feather Icons.
labels: automated pr
assignees: |
Pixelrobin
natewiebe13

- name: Check outputs
run: |
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"
1 change: 1 addition & 0 deletions bin/build.php → bin/build
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/usr/bin/env php
<?php

function getSvgAttributes(string $svg): array
Expand Down
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,10 @@
"ext-libxml": "*",
"ext-simplexml": "*",
"phpunit/phpunit": "^9.5",
"npm-asset/feather-icons": "4.26.0"
"npm-asset/feather-icons": ">=4.28"
},
"scripts": {
"build": "bin/build",
"test": "phpunit --verbose tests"
}
}