Bump docker/setup-buildx-action from 3 to 4 #950
This file contains hidden or 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
| name: Install | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| install: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: '8.5' | |
| extensions: pdo_mysql | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| - name: Get composer cache directory | |
| id: composer-cache | |
| run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT | |
| - name: Cache composer dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: ${{ steps.composer-cache.outputs.dir }} | |
| key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | |
| restore-keys: ${{ runner.os }}-composer- | |
| - name: Cache npm dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.npm | |
| key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }} | |
| restore-keys: ${{ runner.os }}-npm- | |
| - name: Start database | |
| run: sudo /etc/init.d/mysql start | |
| - name: Create database and user | |
| run: | | |
| mysql -e "CREATE DATABASE IF NOT EXISTS liberu_testing;" -uroot -proot | |
| mysql -e "CREATE USER IF NOT EXISTS 'liberu'@'%' IDENTIFIED WITH mysql_native_password BY 'secret';" -uroot -proot | |
| mysql -e "GRANT ALL PRIVILEGES ON liberu_testing.* TO 'liberu'@'%'; FLUSH PRIVILEGES;" -uroot -proot | |
| - name: Copy environment file | |
| run: cp .env.testing .env | |
| - name: Install dependencies | |
| run: composer install | |
| - name: Generate application key | |
| run: php artisan key:generate | |
| - name: Run database migrations | |
| run: php artisan migrate | |
| - name: Seed database | |
| run: php artisan db:seed | |
| - name: Install npm dependencies | |
| run: npm install | |
| - name: Build frontend assets | |
| run: npm run build |