Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update witness.yml with workingdir input #16

Merged
merged 3 commits into from
Jan 21, 2025

Conversation

kriscoleman
Copy link
Member

changes to get workingdir working with john's reusable workflow branch

@jkjell we have this and one other PR on your reusable workflow branch. Total that's 3 prs not merged to main that we're using in one place or another. We should get those all merged before we lose track.

@kriscoleman kriscoleman mentioned this pull request Jan 13, 2025
@kriscoleman kriscoleman force-pushed the workingdir-input branch 4 times, most recently from 306b71b to e229e82 Compare January 15, 2025 19:36
@kriscoleman kriscoleman marked this pull request as draft January 15, 2025 19:38
@kriscoleman
Copy link
Member Author

@georgesdugue and I found more issues with this. Because of the conditional on pull_request, it changes how the process runs after merge, and after merge things broke down.

working through some more fixes

@kriscoleman kriscoleman force-pushed the workingdir-input branch 3 times, most recently from c3d9089 to 6bea697 Compare January 15, 2025 19:54
Added a new 'workingdir' input to the GitHub Actions workflow. This allows for specifying the working directory when running commands. The changes include:
- Added 'workingdir' as an optional input in the workflow_call section.
- Updated testifysec/witness-run-action usage to include 'workingdir'.
- Set 'working-directory' for run commands when pull_request is true.
This enhancement provides more flexibility in configuring workflows, especially when dealing with projects that have complex structures or require specific execution contexts.
@kriscoleman
Copy link
Member Author

kriscoleman commented Jan 15, 2025

worked through the issues

  • ncc wasn't in package.json so couldn't build
  • fixed conditionals for workingdir when pull_request == false.
  • witness-install-dir input had a default of ./ but there was a conditional checking for ./ and when we updated it to use workingdir, the conditional would never hit second condition

@kriscoleman kriscoleman marked this pull request as ready for review January 15, 2025 20:19
@kriscoleman kriscoleman merged commit 599989b into reusable-workflow Jan 21, 2025
1 check passed
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.

2 participants