diff --git a/.github/workflows/laravel-9.yml b/.github/workflows/laravel-9.yml deleted file mode 100644 index 61f381e2..00000000 --- a/.github/workflows/laravel-9.yml +++ /dev/null @@ -1,133 +0,0 @@ -name: Laravel 9 -on: - push: - branches: - - main - pull_request: - branches: - - main - schedule: - - cron: '7 6 * * *' - -jobs: - test: - name: Test - runs-on: ubuntu-latest - container: - image: php:8.1-cli - steps: - - name: Checkout - uses: actions/checkout@v2 - - - name: GitHub Environment Variables Action - uses: FranzDiebold/github-env-vars-action@v2.1.0 - - - name: PHPUnit - run: | - apt update - apt install -y libzip-dev unzip - pecl install xdebug - docker-php-ext-enable xdebug - curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer - composer require orchestra/testbench:^v7 --dev - composer run test - - - name: Lint - run: composer run lint - - - name: Lint Dockerfile - uses: hadolint/hadolint-action@v1.6.0 - with: - dockerfile: src/stubs/Dockerfile - - - name: codecov - uses: codecov/codecov-action@v1 - with: - name: laravel-9 - - - name: install in real Laravel project - run: | - rm -rf laravel-demo - composer create-project --prefer-dist laravel/laravel laravel-demo "9.*" - cd laravel-demo && composer require --dev laravel-fans/docker:dev-${CI_ACTION_REF_NAME} && php artisan docker:publish - php artisan --version | awk '{print $3}' > .version - - - name: Create Tar - run: tar -cvf laravel-demo.tar laravel-demo - - - name: Upload Artifact - uses: actions/upload-artifact@v4 - with: - name: laravel-demo - path: laravel-demo.tar - - publish: - name: Publish Code and Docker - if: ${{ github.ref == 'refs/heads/main' }} - needs: test - runs-on: ubuntu-latest - steps: - - name: Download Artifact - uses: actions/download-artifact@v4 - with: - name: laravel-demo - - - name: Extract Tar - run: tar -xvf laravel-demo.tar - - - name: Push code - uses: peaceiris/actions-gh-pages@v3 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: laravel-demo - publish_branch: laravel-9 - destination_dir: demo - allow_empty_commit: true - - - name: Set up QEMU - uses: docker/setup-qemu-action@v1 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 - - - name: Login to DockerHub - uses: docker/login-action@v1 - with: - username: ${{ secrets.DOCKER_HUB_USERNAME }} - password: ${{ secrets.DOCKER_HUB_TOKEN }} - - - name: Get Laravel version - working-directory: ./laravel-demo - run: | - echo "LARAVEL_VERSION=$(cat .version)" >> $GITHUB_ENV - echo "DOCKER_MANIFEST=$((DOCKER_CLI_EXPERIMENTAL=enabled docker manifest inspect laravelfans/laravel:$(cat .version) > /dev/null && echo 'json') || echo '')" >> $GITHUB_ENV - echo "DOCKER_MANIFEST_DEV=$((DOCKER_CLI_EXPERIMENTAL=enabled docker manifest inspect laravelfans/laravel:$(cat .version)-dev > /dev/null && echo 'json') || echo '')" >> $GITHUB_ENV - - - name: Build and push - id: docker_build - uses: docker/build-push-action@v3 - if: ${{ env.DOCKER_MANIFEST == '' || github.event_name == 'push' }} - with: - context: laravel-demo - platforms: linux/amd64,linux/arm64 - push: true - tags: laravelfans/laravel:latest,laravelfans/laravel:9,laravelfans/laravel:${{ env.LARAVEL_VERSION }} - - - name: Image digest - if: steps.docker_build.conclusion == 'success' - run: echo ${{ steps.docker_build.outputs.digest }} - - - name: Build and push dev - id: docker_build_dev - uses: docker/build-push-action@v3 - if: ${{ env.DOCKER_MANIFEST_DEV == '' || github.event_name == 'push' }} - with: - context: laravel-demo - file: laravel-demo/Dockerfile.dev - platforms: linux/amd64,linux/arm64 - push: true - tags: laravelfans/laravel:9-dev,laravelfans/laravel:${{ env.LARAVEL_VERSION }}-dev - - - name: Image digest dev - if: steps.docker_build_dev.conclusion == 'success' - run: echo ${{ steps.docker_build_dev.outputs.digest }} diff --git a/README.md b/README.md index 4b5b3656..a9e7751c 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,8 @@ # Laravel Docker [![codecov](https://codecov.io/gh/laravel-fans/laravel-docker/branch/main/graph/badge.svg)](https://codecov.io/gh/laravel-fans/laravel-docker) -[![Laravel 8](https://github.com/laravel-fans/laravel-docker/workflows/Laravel%208/badge.svg)](https://github.com/laravel-fans/laravel-docker/actions/workflows/laravel-8.yml) -[![Laravel 9](https://github.com/laravel-fans/laravel-docker/workflows/Laravel%209/badge.svg)](https://github.com/laravel-fans/laravel-docker/actions/workflows/laravel-9.yml) [![Laravel 10](https://github.com/laravel-fans/laravel-docker/workflows/Laravel%2010/badge.svg)](https://github.com/laravel-fans/laravel-docker/actions/workflows/laravel-10.yml) +[![Laravel 11](https://github.com/laravel-fans/laravel-docker/workflows/Laravel%2011/badge.svg)](https://github.com/laravel-fans/laravel-docker/actions/workflows/laravel-11.yml) Full Laravel production environment for Docker. diff --git a/src/DockerPublishCommand.php b/src/DockerPublishCommand.php index bd74af72..e2c0faf7 100644 --- a/src/DockerPublishCommand.php +++ b/src/DockerPublishCommand.php @@ -32,7 +32,7 @@ public function handle() { $basePath = $this->laravel->basePath(); - File::copyDirectory(__DIR__ . '/stubs', $basePath, FilesystemIterator::CURRENT_MODE_MASK); + File::copyDirectory(__DIR__ . '/stubs', $basePath); // TODO: no testable, can not mock $phpVersion = $this->option('php-version') ?? PHP_MAJOR_VERSION . '.' . PHP_MINOR_VERSION;