Skip to content

Commit 6c30b0e

Browse files
author
Konrad Michalik
authored
Merge pull request #47 from move-elevator/reusable-github-actions
chore: replace inline CGL steps with reusable GitHub Actions workflow
2 parents 2a2ffd7 + a648f01 commit 6c30b0e

1 file changed

Lines changed: 1 addition & 49 deletions

File tree

.github/workflows/cgl.yml

Lines changed: 1 addition & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -6,52 +6,4 @@ on:
66

77
jobs:
88
cgl:
9-
runs-on: ubuntu-latest
10-
steps:
11-
- uses: actions/checkout@v4
12-
with:
13-
fetch-depth: 0
14-
15-
# Prepare environment
16-
- name: Setup PHP
17-
uses: shivammathur/setup-php@v2
18-
with:
19-
# @todo Use PHP 8.4 once PHP-CS-Fixer supports PHP 8.4
20-
php-version: 8.3
21-
tools: composer:v2, composer-require-checker, composer-unused, cs2pr
22-
env:
23-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
24-
25-
# Validation
26-
- name: Validate composer.json
27-
run: composer validate
28-
29-
# Install dependencies
30-
- name: Add required packages
31-
run: composer require composer/composer:"^2.2"
32-
33-
# Check Composer dependencies
34-
- name: Check dependencies
35-
run: composer-require-checker check
36-
- name: Reset composer.json
37-
run: git checkout composer.json composer.lock
38-
- name: Re-install Composer dependencies
39-
uses: ramsey/composer-install@v3
40-
- name: Check for unused dependencies
41-
run: composer-unused
42-
43-
# Linting
44-
- name: Lint composer.json
45-
run: composer lint:composer
46-
- name: Lint Editorconfig
47-
run: composer lint:editorconfig
48-
- name: Lint PHP
49-
run: composer lint:php -- --format checkstyle | cs2pr
50-
51-
# SCA
52-
- name: SCA PHP
53-
run: composer sca:php -- --error-format github
54-
55-
# Migration
56-
- name: Run Rector migration
57-
run: composer migration:rector -- --dry-run
9+
uses: jackd248/reusable-github-actions/.github/workflows/cgl.yml@main

0 commit comments

Comments
 (0)