Publish default Laravel Sail images #121
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
name: 'Publish default Laravel Sail images' | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 0 * * 0' # Weekly | |
jobs: | |
build-docker-images: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Login to Docker Hub | |
uses: docker/login-action@v2 | |
with: | |
username: initializerforlaravel | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- uses: shivammathur/setup-php@1a18b2267f80291a81ca1d33e7c851fe09e7dfc4 | |
with: | |
php-version: '8.2' | |
- uses: actions/checkout@v2 | |
- name: Validate composer.json and composer.lock | |
run: composer validate --strict | |
- name: Copy .env | |
run: php -r "file_exists('.env') || copy('.env.example', '.env');" | |
- name: Cache Composer packages | |
id: composer-cache | |
uses: actions/cache@v2 | |
with: | |
path: vendor | |
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }} | |
restore-keys: | | |
${{ runner.os }}-php- | |
- name: Install Dependencies | |
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist | |
- name: Generate key | |
run: php artisan key:generate | |
- name: Directory Permissions | |
run: chmod -R 777 storage bootstrap/cache | |
- name: Update Images | |
run: 'php artisan initializer:update-sail-images' |