5 new domains, switch from ddev to docker #12
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: CI/CD Pipeline | |
| on: | |
| push: | |
| branches: [ master ] | |
| pull_request: | |
| branches: [ master ] | |
| jobs: | |
| test: | |
| name: Run Tests | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| php: [8.3, 8.4] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.php }} | |
| extensions: mbstring, iconv | |
| coverage: pcov | |
| - name: Validate composer.json and composer.lock | |
| run: composer validate --strict | |
| - name: Get composer cache directory | |
| id: composer-cache | |
| run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT | |
| - name: Cache dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: ${{ steps.composer-cache.outputs.dir }} | |
| key: ${{ runner.os }}-php-${{ matrix.php }}-composer-${{ hashFiles('**/composer.lock') }} | |
| restore-keys: ${{ runner.os }}-php-${{ matrix.php }}-composer- | |
| - name: Install dependencies | |
| run: composer install --prefer-dist --no-progress | |
| - name: Run quality checks | |
| run: composer run quality | |
| - name: Run tests with coverage | |
| run: composer run test-coverage | |
| security: | |
| name: Security Audit | |
| runs-on: ubuntu-latest | |
| needs: test | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: '8.3' | |
| - name: Install dependencies | |
| run: composer install --prefer-dist --no-progress | |
| - name: Run security audit | |
| run: composer audit | |
| release: | |
| name: Create Release | |
| runs-on: ubuntu-latest | |
| needs: [test, security] | |
| if: github.ref == 'refs/heads/master' && github.event_name == 'push' | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: '8.3' | |
| extensions: mbstring, iconv | |
| - name: Install dependencies | |
| run: composer install --prefer-dist --no-progress | |
| - name: Generate configuration files | |
| run: composer generate | |
| - name: Bump version and push tag | |
| id: create_tag | |
| uses: mathieudutour/github-tag-action@v6.0 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Create Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: ${{ steps.create_tag.outputs.new_tag }} | |
| generate_release_notes: true | |
| files: | | |
| *.conf | |
| *.vcl | |
| *.caddy* | |
| *.res | |
| web.config | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |