From 49b20e59192033542ce7adbf2859524a477bde69 Mon Sep 17 00:00:00 2001 From: Robbin Janssen Date: Mon, 13 Nov 2023 09:37:21 +0000 Subject: [PATCH] Update github actions --- .github/workflows/ci.yaml | 32 +++++++++++-------- .github/workflows/draft-release.yaml | 6 ++-- .../{labels.yaml => sync-labels.yaml} | 9 +++--- .../{pr-labels.yaml => verify-pr-labels.yml} | 15 +++++---- 4 files changed, 35 insertions(+), 27 deletions(-) rename .github/workflows/{labels.yaml => sync-labels.yaml} (64%) rename .github/workflows/{pr-labels.yaml => verify-pr-labels.yml} (67%) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 305d872..d235dd8 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -11,44 +11,50 @@ on: jobs: run-tests: - name: 🪲 Run tests + name: Run tests runs-on: ubuntu-latest strategy: matrix: - php: ["7.3", "7.4", "8.0"] + versions: [ + { php: "7.3", phpunit: "9" }, + { php: "7.4", phpunit: "9" }, + { php: "8.0", phpunit: "9" }, + { php: "8.1", phpunit: "10" }, + ] steps: - - name: 📥 Checkout repository + - name: Checkout repository uses: actions/checkout@v4 - - name: 📦 Composer install + - name: Composer install uses: php-actions/composer@v6 with: - php-version: ${{ matrix.php }} + php_version: ${{ matrix.versions.php }} - - name: 🧰 Run unit tests - uses: php-actions/phpunit@v3 + - name: Run unit tests + uses: php-actions/phpunit@v3.0.0 with: configuration: phpunit.xml - php_version: ${{ matrix.php }} + version: ${{ matrix.versions.phpunit }} + php_version: ${{ matrix.versions.php }} check-code-style: - name: 💅🏻 Check code style + name: Check code style runs-on: ubuntu-latest permissions: contents: write steps: - - name: 📥 Checkout repository + - name: Checkout repository uses: actions/checkout@v4 with: ref: ${{ github.head_ref }} - - name: 🛠 Run php-cs-fixer + - name: Run php-cs-fixer uses: docker://oskarstark/php-cs-fixer-ga - - - name: 🤖 Apply php-cs-fixer changes + + - name: Apply php-cs-fixer changes uses: stefanzweifel/git-auto-commit-action@v5 with: commit_message: Apply php-cs-fixer changes diff --git a/.github/workflows/draft-release.yaml b/.github/workflows/draft-release.yaml index a8ad240..4f04193 100644 --- a/.github/workflows/draft-release.yaml +++ b/.github/workflows/draft-release.yaml @@ -7,11 +7,11 @@ on: - master jobs: - update_release_draft: - name: ✏️ Draft release + update-release-draft: + name: Update runs-on: ubuntu-latest steps: - - name: 🚀 Run Release Drafter + - name: Run release drafter uses: release-drafter/release-drafter@v5 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/labels.yaml b/.github/workflows/sync-labels.yaml similarity index 64% rename from .github/workflows/labels.yaml rename to .github/workflows/sync-labels.yaml index 5775599..0d66eb8 100644 --- a/.github/workflows/labels.yaml +++ b/.github/workflows/sync-labels.yaml @@ -11,13 +11,14 @@ on: jobs: labels: - name: ♻️ Sync labels + name: Sync labels runs-on: ubuntu-latest + steps: - - name: 📥 Checkout repository + - name: Checkout repository uses: actions/checkout@v4 - - name: 🚀 Run Label Syncer - uses: micnncim/action-label-syncer@v1 + - name: Run Label Syncer + uses: micnncim/action-label-syncer@v1.3.0 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/pr-labels.yaml b/.github/workflows/verify-pr-labels.yml similarity index 67% rename from .github/workflows/pr-labels.yaml rename to .github/workflows/verify-pr-labels.yml index 187d545..1a804fa 100644 --- a/.github/workflows/pr-labels.yaml +++ b/.github/workflows/verify-pr-labels.yml @@ -1,22 +1,23 @@ --- -name: PR +name: PR Labels -# yamllint disable-line rule:truthy on: pull_request_target: types: [opened, labeled, unlabeled, synchronize] jobs: - verify_pr_labels: - name: 🏷 Verify Labels + pr-labels: + name: Verify runs-on: ubuntu-latest + steps: - - name: ✅ Verify PR has a valid label + - name: Verify PR has a valid label uses: jesusvasquez333/verify-pr-label-action@v1.4.0 with: github-token: "${{ secrets.GITHUB_TOKEN }}" pull-request-number: "${{ github.event.pull_request.number }}" valid-labels: >- - breaking-change, bugfix, documentation, enhancement, - refactor, performance, new-feature, maintenance, ci, dependencies + breaking-change, bugfix, hotfix, documentation, enhancement, + refactor, performance, new-feature, maintenance, ci, + dependencies, skip-changelog disable-reviews: true