Skip to content

Commit

Permalink
Update Github Actions (#541)
Browse files Browse the repository at this point in the history
  • Loading branch information
gharlan authored Mar 31, 2023
1 parent b6994bb commit e10cd33
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 69 deletions.
10 changes: 10 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Dependabot config reference
# https://help.github.com/en/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: monthly
open-pull-requests-limit: 15
52 changes: 46 additions & 6 deletions .github/workflows/code-style.yml → .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Code Style
name: Check

on:
push:
Expand All @@ -10,19 +10,39 @@ env:
writable: ${{ github.event_name != 'push' && github.event.pull_request.head.repo.full_name == github.repository && github.actor != 'dependabot[bot]' && 1 || 0 }}

jobs:
rexlint:
runs-on: ubuntu-latest
if: github.event.pull_request.draft == false

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.1
coverage: none # disable xdebug, pcov

- name: Composer install
uses: ramsey/composer-install@v2

- name: Run rexlint
run: vendor/bin/rexlint

php-cs-fixer:
runs-on: ubuntu-latest
if: github.event.pull_request.draft == false

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
if: env.writable == 1
with:
ref: ${{ github.head_ref }}
token: ${{ secrets.BOT_TOKEN }}
- name: Checkout fork
uses: actions/checkout@v2
uses: actions/checkout@v3
if: env.writable == 0

- name: Setup PHP
Expand All @@ -34,8 +54,6 @@ jobs:

- name: Composer install
uses: ramsey/composer-install@v2
with:
composer-options: --ansi --prefer-dist

- name: Fix code style
if: env.writable == 1
Expand All @@ -51,4 +69,26 @@ jobs:

- name: Check code style
if: env.writable == 0
run: vendor/bin/php-cs-fixer fix --ansi --diff --dry-run --format=checkstyle | cs2pr # check whether there are still errors left
run: vendor/bin/php-cs-fixer fix --ansi --diff --dry-run --format=checkstyle | cs2pr

psalm:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.1
extensions: intl
coverage: none # disable xdebug, pcov

- name: Composer install
uses: ramsey/composer-install@v2
with:
composer-options: --ansi --prefer-dist

- name: Run psalm analysis
run: vendor/bin/psalm --show-info=false --shepherd --diff --output-format=github
3 changes: 1 addition & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Publish to redaxo.org
uses: FriendsOfREDAXO/installer-action@v1
with:
myredaxo-username: ${{ secrets.MYREDAXO_USERNAME }}
myredaxo-api-key: ${{ secrets.MYREDAXO_API_KEY }}
description: ${{ github.event.release.body }}

30 changes: 0 additions & 30 deletions .github/workflows/rexlint.yml

This file was deleted.

31 changes: 0 additions & 31 deletions .github/workflows/static-analysis.yml

This file was deleted.

0 comments on commit e10cd33

Please sign in to comment.