-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Laravel 10 support * Fix styling --------- Co-authored-by: swapnilsarwe <[email protected]>
- Loading branch information
1 parent
90df4b3
commit ede13ce
Showing
6 changed files
with
142 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
name: Auto Update Icons | ||
|
||
on: | ||
schedule: | ||
- cron: '0 12 * * 1' | ||
|
||
jobs: | ||
generate: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
fail-fast: true | ||
matrix: | ||
php: [8.0] | ||
laravel: [^8.0] | ||
|
||
name: PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }} | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ github.head_ref }} | ||
|
||
- name: Read DotEnv File | ||
uses: c-py/action-dotenv-to-setenv@v2 | ||
with: | ||
env-file: .env | ||
|
||
- name: Checkout dependent repo | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: ${{ env.REPOSITORY }} | ||
ref: ${{ env.BRANCH }} | ||
path: ./dist | ||
|
||
- id: latest-commit | ||
name: Get the latest commit | ||
run: | | ||
echo 'LATEST_COMMIT<<EOF' >> $GITHUB_ENV | ||
cd ./dist && git log --format="%H" -n 1 >> $GITHUB_ENV | ||
echo 'EOF' >> $GITHUB_ENV | ||
- id: current-commit | ||
name: Get current commot | ||
uses: juliangruber/read-file-action@v1 | ||
with: | ||
path: ./.commit | ||
|
||
- name: Add versions to environment | ||
run: | | ||
echo "CURRENT_COMMIT=${{ steps.current-commit.outputs.content }}" >> $GITHUB_ENV | ||
- name: Output versions | ||
run: | | ||
echo "Current commit: ${{ env.CURRENT_COMMIT }}" | ||
echo "Latest commit: ${{ env.LATEST_COMMIT }}" | ||
- name: Install dependencies | ||
run: composer update --no-interaction --no-progress --dev | ||
|
||
- name: Compile icons to resources directory | ||
if: env.CURRENT_COMMIT != env.LATEST_COMMIT | ||
run: ./vendor/bin/blade-icons-generate | ||
|
||
- name: Update commit hash in ".commit" | ||
if: env.CURRENT_COMMIT != env.LATEST_COMMIT | ||
run: echo ${{ env.LATEST_COMMIT }}>./.commit | ||
|
||
- name: Create PR for latest version | ||
if: env.CURRENT_COMMIT != env.LATEST_COMMIT | ||
uses: peter-evans/create-pull-request@v3 | ||
with: | ||
commit-message: "auto-update: update icons with the latest commit ${{ env.LATEST_COMMIT }}" | ||
committer: GitHub Action <[email protected]> | ||
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com> | ||
title: "chore: update icons with the latest commit v${{ env.LATEST_COMMIT }}" | ||
body: | | ||
This updates from [${{ env.CURRENT_COMMIT }}](https://github.com/${{ env.REPOSITORY }}/commit/${{ env.CURRENT_COMMIT }}) to [${{ env.LATEST_COMMIT }}](https://github.com/${{ env.REPOSITORY }}/commit/${{ env.LATEST_COMMIT }}). | ||
Check out the differences: [`${{ env.CURRENT_COMMIT }}` ... `${{ env.LATEST_COMMIT }}`](https://github.com/${{ env.REPOSITORY }}/compare/${{ env.CURRENT_COMMIT }}...${{ env.LATEST_COMMIT }}) | ||
branch: feature/update-${{ env.LATEST_COMMIT }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: Check & fix styling | ||
|
||
on: [push] | ||
|
||
jobs: | ||
php-cs-fixer: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
fail-fast: true | ||
matrix: | ||
php: [8.0] | ||
laravel: [^8.0] | ||
|
||
name: PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }} | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: ${{ github.head_ref }} | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php }} | ||
extensions: dom, curl, libxml, mbstring, zip | ||
coverage: none | ||
|
||
- name: Install dependencies | ||
run: composer update --prefer-dist --no-interaction --no-progress | ||
|
||
- name: Run PHP CS Fixer | ||
run: vendor/bin/php-cs-fixer fix | ||
|
||
- name: Commit changes | ||
uses: stefanzweifel/git-auto-commit-action@v4 | ||
with: | ||
commit_message: Fix styling | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters