diff --git a/.cloud/dagger/scheduler_bundle.cue b/.cloud/dagger/scheduler_bundle.cue new file mode 100644 index 00000000..99ab85a9 --- /dev/null +++ b/.cloud/dagger/scheduler_bundle.cue @@ -0,0 +1,57 @@ +package scheduler_bundle + +import ( + "dagger.io/dagger" + "universe.dagger.io/docker" +) + +dagger.#Plan & { + _vendorMount: "/srv/app/vendor": { + dest: "/srv/app/vendor", + type: "cache", + contents: id: "vendor-cache" + } + + client: { + filesystem: "./": read: exclude: [".cloud/dagger", ".github", ".changelog", ".gitattributes", ".gitignore", "doc", "CONTRIBUTING.md", "README.md", "vendor"] + env: APP_ENV: "test" + } + + actions: { + #Composer: docker.#Run & { + command: name: "composer" + } + composer: docker.#Pull & { + source: "composer" + } + [tag=string]: { + versions: { + "8.0": _, + "8.1": _, + build: docker.#Build & { + #Run: docker.#Run & { + input: build.output + mounts: _vendorMount + } + steps: [ + docker.#Pull & { + source: "php:\(tag)" + }, + docker.#Copy & { + input: composer.output + contents: build.output + path: "/usr/bin/composer" + }, + #Composer & { + command: args: ["update", "--prefer-stable"] + mounts: _vendorMount + }, + #Composer & { + command: args: ["dump-autoload", "--optimize", "--classmap-authoritative"] + }, + ] + } + } + } + } +} diff --git a/.github/workflows/dagger_style.yml b/.github/workflows/dagger_style.yml new file mode 100644 index 00000000..7dd1121c --- /dev/null +++ b/.github/workflows/dagger_style.yml @@ -0,0 +1,25 @@ +name: Dagger - Style +on: + push: + branches: + - main + pull_request: + branches: + - main + schedule: + - cron: "0 0 * * *" + +env: + DAGGER_LOG_FORMAT: plain + +jobs: + dagger: + runs-on: ubuntu-latest + steps: + - name: Clone repository + uses: actions/checkout@v2 + + - name: PHP-CS-Fixer + uses: dagger/dagger-for-github@v2 + with: + args: do php_cs_fixer --plan .cloud/dagger/scheduler_bundle.cue diff --git a/.gitignore b/.gitignore index 4fd8718f..4bae85a1 100644 --- a/.gitignore +++ b/.gitignore @@ -21,3 +21,6 @@ tests/.assets/**/*.json # Docker docker-compose.override.yaml + +# Dagger +cue.mod diff --git a/.symfony.insight.yaml b/.symfony.insight.yaml index c2582f25..3d41ec5f 100644 --- a/.symfony.insight.yaml +++ b/.symfony.insight.yaml @@ -1,4 +1,4 @@ -php_version: 7.4 +php_version: 8.0 global_exclude_dirs: - .github