Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 5 additions & 13 deletions .github/workflows/actionlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,15 @@ name: actionlint
on:
push:
branches:
- main
- main
paths:
- .github/workflows/**
- .github/workflows/**
pull_request:
branches:
- main
- main
paths:
- .github/workflows/**
- .github/workflows/**

jobs:
actionlint:
name: Lint GitHub Actions workflows
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v6

- name: Run actionlint
uses: rhysd/actionlint@v1.7.12
uses: openCoreEMR/github-workflows-public/.github/workflows/actionlint.yml@0.0.4
42 changes: 12 additions & 30 deletions .github/workflows/composer-normalize.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,39 +3,21 @@ name: Composer Normalize
on:
push:
branches:
- main
- main
paths:
- composer.json
- .github/workflows/composer-normalize.yml
pull_request:
branches:
- main
- main
paths:
- composer.json
- .github/workflows/composer-normalize.yml

jobs:
composer-normalize:
if: ${{ !github.event.repository.is_template }}
name: Normalize composer.json (check)
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v6

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.5'
extensions: json, curl
coverage: none
tools: composer:v2

- name: Cache Composer dependencies
uses: actions/cache@v5
with:
path: vendor
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-

- name: Install dependencies
run: composer install --prefer-dist --no-progress --no-interaction

- name: Normalize composer.json (check)
uses: openCoreEMR/github-workflows-public/.github/workflows/php-composer-script.yml@0.0.4
with:
name: Normalize composer.json (check)
run: composer normalize --dry-run
php-version: '8.5'
51 changes: 20 additions & 31 deletions .github/workflows/composer-require-checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,39 +3,28 @@ name: Composer Require Checker
on:
push:
branches:
- main
- main
paths:
- composer.json
- composer.lock
- '**.php'
- .composer-require-checker.json
- .github/workflows/composer-require-checker.yml
pull_request:
branches:
- main
- main
paths:
- composer.json
- composer.lock
- '**.php'
- .composer-require-checker.json
- .github/workflows/composer-require-checker.yml

jobs:
composer-require-checker:
if: ${{ !github.event.repository.is_template }}
name: Run Composer Require Checker
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v6

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.5'
extensions: json, curl
coverage: none
tools: composer:v2, composer-require-checker

- name: Cache Composer dependencies
uses: actions/cache@v5
with:
path: vendor
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-

- name: Install dependencies
run: composer install --prefer-dist --no-progress --no-interaction

- name: Run Composer Require Checker
run: composer-require-checker check --config-file=.composer-require-checker.json
uses: openCoreEMR/github-workflows-public/.github/workflows/php-composer-script.yml@0.0.4
with:
name: Run Composer Require Checker
run: composer require-checker
php-tools: 'composer:v2, composer-require-checker'
php-version: '8.5'
32 changes: 13 additions & 19 deletions .github/workflows/composer-validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,22 @@ name: Composer Validate
on:
push:
branches:
- main
- main
paths:
- composer.json
- .github/workflows/composer-validate.yml
pull_request:
branches:
- main
- main
paths:
- composer.json
- .github/workflows/composer-validate.yml

jobs:
composer-validate:
if: ${{ !github.event.repository.is_template }}
name: Validate composer.json
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v6

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.5'
extensions: json, curl
coverage: none
tools: composer:v2

- name: Validate composer.json
uses: openCoreEMR/github-workflows-public/.github/workflows/php-composer-script.yml@0.0.4
with:
name: Validate composer.json
run: composer validate --strict
install-deps: false
php-version: '8.5'
29 changes: 1 addition & 28 deletions .github/workflows/conventional-pr-title.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,33 +4,6 @@ on:
pull_request:
types: [opened, edited, synchronize, reopened]

permissions:
pull-requests: read

jobs:
conventional-pr-title:
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
types: |
feat
fix
docs
style
refactor
perf
test
build
ci
chore
revert
deps
requireScope: false
subjectPattern: ^(?![A-Z]).+$
subjectPatternError: |
The subject "{subject}" found in the pull request title "{title}"
didn't match the configured pattern. Please ensure that the subject
doesn't start with an uppercase character.
uses: openCoreEMR/github-workflows-public/.github/workflows/conventional-pr-title.yml@0.0.4
49 changes: 13 additions & 36 deletions .github/workflows/dclint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,46 +3,23 @@ name: dclint
on:
push:
branches:
- main
- main
paths:
- '**/docker-compose*.yml'
- '**/docker-compose*.yaml'
- compose.yml
- compose.yaml
- '**/compose.yml'
- '**/compose.yaml'
- '**/docker-compose*.yml'
- '**/docker-compose*.yaml'
- .github/workflows/dclint.yml
pull_request:
branches:
- main
- main
paths:
- '**/docker-compose*.yml'
- '**/docker-compose*.yaml'
- compose.yml
- compose.yaml
- '**/compose.yml'
- '**/compose.yaml'
- '**/docker-compose*.yml'
- '**/docker-compose*.yaml'
- .github/workflows/dclint.yml

jobs:
dclint:
name: Lint Docker Compose files
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v6

- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: '20'

- name: Install dclint
run: npm install -g dclint

- name: Run dclint
run: |
git ls-files -z 'compose.yml' \
'compose.yaml' \
'docker-compose*.yml' \
'docker-compose*.yaml' \
'**/compose.yml' \
'**/compose.yaml' \
'**/docker-compose*.yml' \
'**/docker-compose*.yaml' |
xargs --null --no-run-if-empty dclint
uses: openCoreEMR/github-workflows-public/.github/workflows/dclint.yml@0.0.4
24 changes: 7 additions & 17 deletions .github/workflows/hadolint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,17 @@ name: hadolint
on:
push:
branches:
- main
- main
paths:
- '**/Dockerfile*'
- '**/Dockerfile*'
- .github/workflows/hadolint.yml
pull_request:
branches:
- main
- main
paths:
- '**/Dockerfile*'
- '**/Dockerfile*'
- .github/workflows/hadolint.yml

jobs:
hadolint:
name: Lint Dockerfiles
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v6

- name: Run hadolint
run: |
git ls-files -z 'Dockerfile*' \
'**/Dockerfile*' |
xargs --null --no-run-if-empty --replace={} \
docker run --rm -v "$PWD:/workdir" -w /workdir hadolint/hadolint hadolint "{}"
uses: openCoreEMR/github-workflows-public/.github/workflows/hadolint.yml@0.0.4
34 changes: 15 additions & 19 deletions .github/workflows/php-syntax-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,24 @@ name: PHP Syntax Check
on:
push:
branches:
- main
- main
paths:
- '**.php'
- composer.json
- .github/workflows/php-syntax-check.yml
pull_request:
branches:
- main
- main
paths:
- '**.php'
- composer.json
- .github/workflows/php-syntax-check.yml

jobs:
php-syntax-check:
if: ${{ !github.event.repository.is_template }}
name: PHP Syntax Check
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v6

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.5'
extensions: json, curl
coverage: none
tools: composer:v2

- name: PHP Syntax Check
uses: openCoreEMR/github-workflows-public/.github/workflows/php-composer-script.yml@0.0.4
with:
name: PHP Syntax Check
run: composer php-lint
install-deps: false
php-version: '8.5'
Loading