From 1c3431bcfdbcd4bbae341527f9c7f90d3fb040a3 Mon Sep 17 00:00:00 2001 From: "J. Peter M. Schuler" Date: Wed, 2 Aug 2023 10:08:27 +0200 Subject: [PATCH] [TASK] update CI conf and images --- .github/workflows/ci.yml | 29 ++++++++++++++--------------- .github/workflows/ter-upload.yml | 2 +- 2 files changed, 15 insertions(+), 16 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6649f29..d5591e5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,7 +11,7 @@ jobs: php-lint: if: "!contains(github.event.head_commit.message, 'ci skip') && !contains(github.event.head_commit.message, '[RELEASE]')" name: "PHP linter" - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - name: "Checkout" uses: actions/checkout@v3 @@ -20,20 +20,18 @@ jobs: with: php-version: "${{ matrix.php-version }}" coverage: none - tools: composer:v2.4 + tools: composer:v2.5 - name: "Run PHP lint" run: "composer lint:php" strategy: fail-fast: false matrix: php-version: - - 7.4 - - 8.0 - 8.1 php-codequality: if: "!contains(github.event.head_commit.message, 'ci skip') && !contains(github.event.head_commit.message, '[RELEASE]')" name: "Code quality checks" - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - name: "Checkout" uses: actions/checkout@v3 @@ -42,7 +40,7 @@ jobs: with: php-version: "${{ matrix.php-version }}" coverage: none - tools: composer:v2.4 + tools: composer:v2.5 - name: "Show Composer version" run: composer --version - name: "Cache dependencies installed with composer" @@ -60,22 +58,24 @@ jobs: matrix: command: - "normalize" - - "lint:php-cs-fixer:dry-run" - - "lint:phpcs:dry-run" - - "lint:phpstan:ci" + - "run lint:php-cs-fixer:dry-run" + - "run lint:phpcs:dry-run" + - "run lint:phpstan:ci" php-version: - - 7.4 + - 8.1 calculate-version: name: "calculating next SemVer" - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 needs: [ php-lint,php-codequality ] + if: github.ref == 'refs/heads/main' outputs: majorMinorPatch: ${{ steps.gitversion.outputs.majorMinorPatch }} # To use an output in another job, you have to map it to a job output. steps: - name: Checkout uses: actions/checkout@v3 with: + token: ${{ secrets.PAT }} fetch-depth: 0 - name: Install GitVersion uses: gittools/actions/gitversion/setup@v0 @@ -95,15 +95,15 @@ jobs: echo "Minor: ${{ steps.gitversion.outputs.minor }}" echo "Patch: ${{ steps.gitversion.outputs.patch }}" echo "MajorMinorPatch: ${{ steps.gitversion.outputs.majorMinorPatch }}" - - name: "Set Git User and Mail" + - name: Set Git User and Mail run: | git config user.name "GitHub Actions Bot" git config user.email "<>" - - name: "Composer install" + - name: Composer install uses: php-actions/composer@v6 with: args: --ignore-platform-req=ext-gd --ignore-platform-req=ext-pcntl --ignore-platform-req=ext-zip - php_version: "7.4" + php_version: "8.1" - name: "Create new tag, updating optional version files" run: | export GIT_LASTTAG="$(git describe --tags --abbrev=0)" @@ -111,7 +111,6 @@ jobs: composer run version:set $GitVersion_MajorMinorPatch || true git commit ext_emconf.php -m "[RELEASE] Releasing v${GitVersion_MajorMinorPatch}" || true git tag v${GitVersion_MajorMinorPatch} -m "[RELEASE] Releasing v${GitVersion_MajorMinorPatch}" -m "" -m "Changes since last release:" -m "${CHANGELOG}" - echo "CHANGELOG=${CHANGELOG}" >> "$GITHUB_ENV" - name: "Publish new tag to GitHub" run: | git push origin v${GitVersion_MajorMinorPatch} diff --git a/.github/workflows/ter-upload.yml b/.github/workflows/ter-upload.yml index c385a25..a349280 100644 --- a/.github/workflows/ter-upload.yml +++ b/.github/workflows/ter-upload.yml @@ -3,7 +3,7 @@ name: TERUpload on: push: tags: - - "**" + - v* jobs: TERUpload: