diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000..a9908fa --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1 @@ +/.github/ @SRWieZ diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..8771be3 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,15 @@ +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "monthly" + time: "09:00" + timezone: "Europe/Paris" + labels: + - "dependencies" + - "ci" + groups: + github-actions: + patterns: + - "*" diff --git a/.github/workflows/pint.yml b/.github/workflows/pint.yml index 2868d8d..be473dd 100644 --- a/.github/workflows/pint.yml +++ b/.github/workflows/pint.yml @@ -1,35 +1,32 @@ name: Linting + on: workflow_dispatch: + pull_request: push: - branches-ignore: - - 'dependabot/npm_and_yarn/*' + branches: + - main + +permissions: + contents: read + jobs: pint: runs-on: ubuntu-latest - permissions: - contents: write steps: - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 + with: + persist-credentials: false - name: Setup PHP - uses: shivammathur/setup-php@v2 + uses: shivammathur/setup-php@7c071dfe9dc99bdf297fa79cb49ea005b9fcadbc # v2.37.1 with: php-version: '8.3' tools: composer:v2 - - name: Copy .env - run: php -r "file_exists('.env') || copy('.env.example', '.env');" - - name: Install Dependencies run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist - - name: Launch Pint inspection - run: vendor/bin/pint - - - name: Commit changes - uses: stefanzweifel/git-auto-commit-action@v4 - with: - commit_message: PHP Linting (Pint) - skip_fetch: true \ No newline at end of file + - name: Run Pint + run: vendor/bin/pint --test diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d6ec939..e3594b1 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -6,6 +6,9 @@ on: branches: - main +permissions: + contents: read + jobs: test: runs-on: ${{ matrix.os }} @@ -20,10 +23,12 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 + with: + persist-credentials: false - name: Setup PHP - uses: shivammathur/setup-php@v2 + uses: shivammathur/setup-php@7c071dfe9dc99bdf297fa79cb49ea005b9fcadbc # v2.37.1 with: php-version: ${{ matrix.php }} tools: composer:v2 @@ -42,7 +47,7 @@ jobs: echo "dir=$dir" >> $env:GITHUB_OUTPUT - name: Cache dependencies - uses: actions/cache@v4 + uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 with: path: ${{ steps.composer-cache-unix.outputs.dir || steps.composer-cache-windows.outputs.dir }} key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} @@ -52,4 +57,4 @@ jobs: run: composer update --no-interaction --prefer-dist --${{ matrix.stability }} - name: Run tests - run: ./vendor/bin/pest \ No newline at end of file + run: ./vendor/bin/pest