diff --git a/.github/sample-workflows/analyse.yml b/.github/sample-workflows/analyse.yml index e19d5b9..cc3928c 100644 --- a/.github/sample-workflows/analyse.yml +++ b/.github/sample-workflows/analyse.yml @@ -4,7 +4,7 @@ on: ["push", "pull_request"] jobs: test: - uses: rapidez/workflows/.github/workflows/analyse.yml + uses: rapidez/workflows/.github/workflows/analyse.yml@master strategy: fail-fast: true matrix: @@ -17,9 +17,9 @@ jobs: testbench: 10.* - laravel: 13.* testbench: 11.* - with: - os: ${{ matrix.os }} - php: ${{ matrix.php }} - laravel: ${{ matrix.laravel }} - testbench: ${{ matrix.testbench }} - stability: ${{ matrix.stability }} + with: + os: ${{ matrix.os }} + php: ${{ matrix.php }} + laravel: ${{ matrix.laravel }} + testbench: ${{ matrix.testbench }} + stability: ${{ matrix.stability }} diff --git a/.github/sample-workflows/changelog.yml b/.github/sample-workflows/changelog.yml new file mode 100644 index 0000000..2d5129d --- /dev/null +++ b/.github/sample-workflows/changelog.yml @@ -0,0 +1,16 @@ +name: "Update Changelog" + +on: + workflow_dispatch: + release: + types: [ published, edited, deleted ] + +jobs: + generate: + uses: rapidez/workflows/.github/workflows/changelog.yml@master + with: + repository: ${{ github.repository }} + branch: ${{ github.event.release.target_commitish }} + ref: ${{ github.head_ref || github.ref_name }} + token: ${{ secrets.RAPIDEZ_ACTIONS_ACCOUNT_PAT }} + github-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/sample-workflows/coverage.yml b/.github/sample-workflows/coverage.yml index 6ad5a45..2e9964f 100644 --- a/.github/sample-workflows/coverage.yml +++ b/.github/sample-workflows/coverage.yml @@ -4,7 +4,7 @@ on: ["push", "pull_request"] jobs: test: - uses: rapidez/workflows/.github/workflows/coverage.yml + uses: rapidez/workflows/.github/workflows/coverage.yml@master strategy: fail-fast: true matrix: @@ -17,9 +17,9 @@ jobs: testbench: 10.* - laravel: 13.* testbench: 11.* - with: - os: ${{ matrix.os }} - php: ${{ matrix.php }} - laravel: ${{ matrix.laravel }} - testbench: ${{ matrix.testbench }} - stability: ${{ matrix.stability }} + with: + os: ${{ matrix.os }} + php: ${{ matrix.php }} + laravel: ${{ matrix.laravel }} + testbench: ${{ matrix.testbench }} + stability: ${{ matrix.stability }} diff --git a/.github/sample-workflows/duster-fix-blame.yml b/.github/sample-workflows/duster-fix-blame.yml new file mode 100644 index 0000000..2dad61a --- /dev/null +++ b/.github/sample-workflows/duster-fix-blame.yml @@ -0,0 +1,14 @@ +name: Duster + +# Commits made in here will not trigger any workflows +# Checkout Duster's documentation for a workaround + +on: + push: + +jobs: + duster: + uses: rapidez/workflows/.github/workflows/duster-fix-blame.yml@master + with: + ref: ${{ github.head_ref }} + repo-token: ${{ secrets.RAPIDEZ_ACTIONS_ACCOUNT_PAT }} diff --git a/.github/sample-workflows/prettier.yml b/.github/sample-workflows/prettier.yml index 4e97316..851a090 100644 --- a/.github/sample-workflows/prettier.yml +++ b/.github/sample-workflows/prettier.yml @@ -4,4 +4,6 @@ on: ["push", "pull_request"] jobs: test: - uses: rapidez/workflows/.github/workflows/prettier.yml + uses: rapidez/workflows/.github/workflows/prettier.yml@master + with: + os: ${{ matrix.os }} diff --git a/.github/sample-workflows/style.yml b/.github/sample-workflows/style.yml index 9b19f6d..7467b68 100644 --- a/.github/sample-workflows/style.yml +++ b/.github/sample-workflows/style.yml @@ -4,4 +4,4 @@ on: ["push", "pull_request"] jobs: test: - uses: rapidez/workflows/.github/workflows/style.yml + uses: rapidez/workflows/.github/workflows/style.yml@master diff --git a/.github/sample-workflows/tests.yml b/.github/sample-workflows/tests.yml index 83b01ec..edcd8a1 100644 --- a/.github/sample-workflows/tests.yml +++ b/.github/sample-workflows/tests.yml @@ -4,7 +4,7 @@ on: ["push", "pull_request"] jobs: test: - uses: rapidez/workflows/.github/workflows/tests.yml + uses: rapidez/workflows/.github/workflows/tests.yml@master strategy: fail-fast: true matrix: @@ -17,9 +17,9 @@ jobs: testbench: 10.* - laravel: 13.* testbench: 11.* - with: - os: ${{ matrix.os }} - php: ${{ matrix.php }} - laravel: ${{ matrix.laravel }} - testbench: ${{ matrix.testbench }} - stability: ${{ matrix.stability }} + with: + os: ${{ matrix.os }} + php: ${{ matrix.php }} + laravel: ${{ matrix.laravel }} + testbench: ${{ matrix.testbench }} + stability: ${{ matrix.stability }} diff --git a/.github/sample-workflows/translations.yml b/.github/sample-workflows/translations.yml new file mode 100644 index 0000000..ffc8cff --- /dev/null +++ b/.github/sample-workflows/translations.yml @@ -0,0 +1,12 @@ +name: Check translations + +on: + push: + branches: + - master + - '*.x' + pull_request: + +jobs: + translations: + uses: rapidez/workflows/.github/workflows/translations.yml@master diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml new file mode 100644 index 0000000..2e67dff --- /dev/null +++ b/.github/workflows/changelog.yml @@ -0,0 +1,50 @@ +name: "Update Changelog" + +on: + workflow_call: + inputs: + repository: + required: true + type: string + branch: + required: true + type: string + ref: + required: true + type: string + token: + required: true + type: string + github-token: + required: true + type: string + os: + required: false + type: string + default: ubuntu-latest + +jobs: + generate: + runs-on: ${{ inputs.os }} + + steps: + - name: Checkout code + uses: actions/checkout@v3 + with: + ref: ${{ inputs.branch }} + token: ${{ inputs.token }} + + - name: Generate changelog + uses: justbetter/generate-changelogs-action@main + env: + GITHUB_TOKEN: ${{ inputs.github-token }} + with: + repository: ${{ inputs.repository }} + sha: ${{ inputs.ref }} + + - name: Commit CHANGELOG + uses: stefanzweifel/git-auto-commit-action@v4 + with: + branch: ${{ inputs.branch }} + commit_message: Update CHANGELOG + file_pattern: CHANGELOG.md diff --git a/.github/workflows/duster-fix-blame.yml b/.github/workflows/duster-fix-blame.yml new file mode 100644 index 0000000..acc71d4 --- /dev/null +++ b/.github/workflows/duster-fix-blame.yml @@ -0,0 +1,43 @@ +name: Duster + +# Commits made in here will not trigger any workflows +# Checkout Duster's documentation for a workaround + +on: + workflow_call: + inputs: + ref: + required: true + type: string + repo-token: + required: true + type: string + os: + required: false + type: string + default: ubuntu-latest + +jobs: + duster: + runs-on: ${{ inputs.os }} + + permissions: + contents: write + + steps: + - uses: actions/checkout@v3 + with: + ref: ${{ inputs.ref }} + token: ${{ inputs.repo-token }} + + - name: "Duster Fix" + uses: tighten/duster-action@v2 + with: + args: fix -vvv + + - uses: stefanzweifel/git-auto-commit-action@v4 + id: auto_commit_action + with: + commit_message: Apply fixes from Duster + commit_user_name: GitHub Action + commit_user_email: actions@github.com diff --git a/.github/workflows/translations.yml b/.github/workflows/translations.yml new file mode 100644 index 0000000..c59d521 --- /dev/null +++ b/.github/workflows/translations.yml @@ -0,0 +1,33 @@ +name: Check translations + +on: + workflow_call: + inputs: + os: + required: false + type: string + default: ubuntu-latest + php: + required: false + type: number + default: 8.5 + +jobs: + translations: + runs-on: ${{ inputs.os }} + + steps: + - name: Checkout code + uses: actions/checkout@v2 + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ inputs.php }} + extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick + coverage: none + + - name: Install dependencies + run: composer install --prefer-dist --no-interaction + + - name: Check translations + uses: rapidez/laravel-translation-checker@master