From dbff83adf08da89cd9a413a8ffa3acd1650f84f2 Mon Sep 17 00:00:00 2001 From: Nate Wiebe Date: Thu, 8 Apr 2021 10:04:34 -0400 Subject: [PATCH 1/6] Turn the build script into an executable --- bin/{build.php => build} | 1 + composer.json | 1 + 2 files changed, 2 insertions(+) rename bin/{build.php => build} (99%) mode change 100644 => 100755 diff --git a/bin/build.php b/bin/build old mode 100644 new mode 100755 similarity index 99% rename from bin/build.php rename to bin/build index 8516184..3a7d3db --- a/bin/build.php +++ b/bin/build @@ -1,3 +1,4 @@ +#!/usr/bin/env php Date: Thu, 8 Apr 2021 10:07:26 -0400 Subject: [PATCH 2/6] Update the feather icons version requirement to allow for newer versions --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 683053d..1571ffe 100644 --- a/composer.json +++ b/composer.json @@ -39,7 +39,7 @@ "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", From 0de549efb085c3cadaeb933cc1b1d1a21a48051f Mon Sep 17 00:00:00 2001 From: Nate Wiebe Date: Thu, 8 Apr 2021 10:35:18 -0400 Subject: [PATCH 3/6] Add recurring Github action for automated updates --- .github/workflows/auto-update.yml | 69 +++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 .github/workflows/auto-update.yml diff --git a/.github/workflows/auto-update.yml b/.github/workflows/auto-update.yml new file mode 100644 index 0000000..ca62047 --- /dev/null +++ b/.github/workflows/auto-update.yml @@ -0,0 +1,69 @@ +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 + + - 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: + token: ${{ secrets.AUTO_PAT }} + 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 }}" From 0a64107cbc0aef2fbb4a6179b383a905e225d9fe Mon Sep 17 00:00:00 2001 From: Nate Wiebe Date: Thu, 8 Apr 2021 10:50:29 -0400 Subject: [PATCH 4/6] Use deploy keys instead of tokens --- .github/workflows/auto-update.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/auto-update.yml b/.github/workflows/auto-update.yml index ca62047..fefea75 100644 --- a/.github/workflows/auto-update.yml +++ b/.github/workflows/auto-update.yml @@ -15,6 +15,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + with: + ssh-key: ${{ secrets.SSH_PRIVATE_KEY }} - name: Setup PHP uses: shivammathur/setup-php@v2 @@ -51,7 +53,6 @@ jobs: - name: Create Pull Request uses: peter-evans/create-pull-request@v3 with: - token: ${{ secrets.AUTO_PAT }} commit-message: Update resources from Feather icons branch: automated/feather-update delete-branch: true From cd1a01a37da095b9e29358b9bbcf39f0381ffe39 Mon Sep 17 00:00:00 2001 From: Nate Wiebe Date: Thu, 8 Apr 2021 10:55:35 -0400 Subject: [PATCH 5/6] Explicitly check out v2.0 --- .github/workflows/auto-update.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/auto-update.yml b/.github/workflows/auto-update.yml index fefea75..bb6813a 100644 --- a/.github/workflows/auto-update.yml +++ b/.github/workflows/auto-update.yml @@ -17,6 +17,7 @@ jobs: uses: actions/checkout@v2 with: ssh-key: ${{ secrets.SSH_PRIVATE_KEY }} + ref: 'v2.0' - name: Setup PHP uses: shivammathur/setup-php@v2 From 4fcb07b451b36f8ac40768353b922ddf137f983d Mon Sep 17 00:00:00 2001 From: Nate Wiebe Date: Thu, 8 Apr 2021 16:09:18 -0400 Subject: [PATCH 6/6] Remove pulling specific branch since this will only run on the default branch --- .github/workflows/auto-update.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/auto-update.yml b/.github/workflows/auto-update.yml index bb6813a..fefea75 100644 --- a/.github/workflows/auto-update.yml +++ b/.github/workflows/auto-update.yml @@ -17,7 +17,6 @@ jobs: uses: actions/checkout@v2 with: ssh-key: ${{ secrets.SSH_PRIVATE_KEY }} - ref: 'v2.0' - name: Setup PHP uses: shivammathur/setup-php@v2