Skip to content

Add working_directory input to reusable workflows#75

Merged
fumikito merged 2 commits intomainfrom
feature/working-directory
Nov 28, 2025
Merged

Add working_directory input to reusable workflows#75
fumikito merged 2 commits intomainfrom
feature/working-directory

Conversation

@fumikito
Copy link
Copy Markdown
Contributor

@fumikito fumikito commented Nov 28, 2025

Summary

  • 再利用可能なワークフローに working_directory 入力を追加し、サブディレクトリでも動作するように改善
  • lint.yml のワークフロー参照をローカルパス(./)に変更し、PRブランチ上の変更をテスト可能に

Changes

Workflows updated

  • phpcs.yml - working_directory 追加
  • phplint.yml - working_directory 追加、hashFiles() パス修正
  • wp-unit-test.yml - working_directory 追加
  • npm.yml - working_directory 追加
  • php-short-open-tag.yml - working_directoryinstall_command 追加

Test infrastructure

  • lint.yml - ローカル参照に変更(@main./
  • tests/sub/valid.php - working_directory テスト用ファイル追加

Usage

jobs:
  phpcs:
    uses: tarosky/workflows/.github/workflows/phpcs.yml@main
    with:
      working_directory: 'packages/my-plugin'

Test plan

  • phplint ジョブが tests/sub のみを対象にして成功すること
  • 他のジョブが正常に動作すること

Closes #72

🤖 Generated with Claude Code

fumikito and others added 2 commits November 28, 2025 14:54
- phpcs.yml: Add working_directory input with defaults.run
- phplint.yml: Add working_directory input with hashFiles fix
- wp-unit-test.yml: Add working_directory input with defaults.run
- npm.yml: Add working_directory input with defaults.run
- php-short-open-tag.yml: Add working_directory and install_command inputs

This allows workflows to run in subdirectories (e.g., monorepos).

Closes #72

Co-authored-by: Claude <noreply@anthropic.com>
- Change all @main references to local paths (./)
- Add working_directory: tests/sub to phplint job
- Add tests/sub/valid.php for working_directory test

This enables testing workflow changes before merging to main.

Related to #72

Co-authored-by: Claude <noreply@anthropic.com>
@fumikito fumikito force-pushed the feature/working-directory branch from a2befb9 to 9817443 Compare November 28, 2025 05:55
@fumikito fumikito merged commit 120d880 into main Nov 28, 2025
9 checks passed
@fumikito fumikito deleted the feature/working-directory branch November 28, 2025 05:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

working-directoryを指定できない

1 participant