Skip to content

Commit

Permalink
Merge pull request #360 from wdssmq/up/phpcs-2024-04
Browse files Browse the repository at this point in the history
up. 更新 phpcs 工作流依赖;(旧版已废弃)
  • Loading branch information
rainbowsoft authored Apr 30, 2024
2 parents a9ea569 + 48d2740 commit dfa1d95
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions .github/workflows/phpcs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,19 @@ jobs:
phpcs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Install dependencies
run: composer install --prefer-dist --no-progress --no-interaction
- name: Get file changes
id: get_file_changes
uses: trilom/file-changes-action@v1.2.4
with:
githubToken: ${{ secrets.GH_BOT_TOKEN }}
output: '" "'
uses: tj-actions/changed-files@v44
- name: PHPCS check
if: ${{ steps.get_file_changes.outputs.files_added != '' || steps.get_file_changes.outputs.files_modified }}
run: ./vendor/bin/phpcs "${{ steps.get_file_changes.outputs.files_added }}" "${{ steps.get_file_changes.outputs.files_modified }}" --report=checkstyle
if: steps.get_file_changes.outputs.any_changed == 'true'
env:
ALL_CHANGED_FILES: ${{ steps.get_file_changes.outputs.all_changed_files }}
run: |
echo "Running PHPCS on the following files:"
echo "${ALL_CHANGED_FILES}"
./vendor/bin/phpcs "${ALL_CHANGED_FILES}" --report=checkstyle

0 comments on commit dfa1d95

Please sign in to comment.