mirror of
https://github.com/ONLYOFFICE/document-server-integration.git
synced 2026-04-07 14:06:11 +08:00
ci: added licenses-php.yml
This commit is contained in:
36
.github/workflows/licenses-php.yml
vendored
Normal file
36
.github/workflows/licenses-php.yml
vendored
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
name: Licenses PHP
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
push:
|
||||||
|
branches: [master, develop]
|
||||||
|
paths: ['web/documentserver-example/php/**']
|
||||||
|
pull_request:
|
||||||
|
branches: [master, develop]
|
||||||
|
paths: ['web/documentserver-example/php/**']
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
licences:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout Repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
- name: Setup PHP
|
||||||
|
uses: shivammathur/setup-php@v2
|
||||||
|
with:
|
||||||
|
php-version: '8.2'
|
||||||
|
tools: cs2pr, phpcs
|
||||||
|
- name: Install Dependensies
|
||||||
|
run: composer install
|
||||||
|
working-directory: ./web/documentserver-example/php
|
||||||
|
- name: Get Repository License
|
||||||
|
id: license
|
||||||
|
run: |
|
||||||
|
license="${{ (github.event.repository.license.spdx_id) || (github.event.repository.licenses[0]) }}"
|
||||||
|
echo "License detected: $license"
|
||||||
|
echo "license=$license" >> $GITHUB_OUTPUT
|
||||||
|
- name: Check Licenses
|
||||||
|
uses: ONLYOFFICE/check-licenses@v1
|
||||||
|
with:
|
||||||
|
project_license: ${{ steps.license.outputs.license }}
|
||||||
|
working_directory: ./web/documentserver-example/php
|
||||||
Reference in New Issue
Block a user