Skip to content

Run Ide-helper automatically #5

Run Ide-helper automatically

Run Ide-helper automatically #5

Workflow file for this run

on: [ pull_request ]
name: CI
jobs:
refresh-ide-helper:
runs-on: ubuntu-latest
container:
image: kirschbaumdevelopment/laravel-test-runner:8.2
services:
mysql:
image: mysql:8.3
env:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: test
ports:
- 33306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install composer dependencies
run: |
composer install --no-scripts
- name: Set up database
run: |
php artisan migrate:fresh
- name: Generate ide-helper comments
run: php artisan ide-helper:refresh
- name: Configure Git
run: |
git config --global user.name 'github-actions'
git config --global user.email '[email protected]'
git config --global --add safe.directory /__w/mars # Add the original repo name as safe
- name: Commit changes
run: |
git add .
git commit -m "Refresh ide-helper automatically" || echo "No changes to commit"
- name: Push changes
env:
GH_PAT: ${{ secrets.GH_PAT }}
run: |
git push https://x-access-token:${GH_PAT}@github.com/${{ github.repository }}.git HEAD:main