Skip to main content

Posts

Showing posts with the label pint

Guide: Unraveling GitHub Actions - Detecting Changes Between Commits

While working at  Hire Dragons , I was assigned the task of creating a GitHub Action workflow. This workflow was designed to use Laravel Pint to check for any changes in the codebase. On our local and off-site development machines, this task would take just a few moments. However, on GitHub, it would take 5-6 minutes to complete. Although you get many free Action minutes, we didn’t want to waste these credits on every commit. Therefore, I began exploring ways to speed up this process. During my research and development, I considered making a list of changes between commit hashes. This turned out to be the quickest method. Let's start off with the code used name: Lint on: push jobs: lint: name: Lint runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v2 - name: Setup PHP uses: shivammathur/setup-php@v2 with: php-version: '8.2' tools: phplint, laravel/pint - name: Get list of cha...