-
Notifications
You must be signed in to change notification settings - Fork 368
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
Update gha #717
Update gha #717
Conversation
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
checkout action only gets a single commit by default. from the docs - fetch-depth: 0
indicates all history for all branches and tags is fetched
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use this action instead. It can return a list of changed company files and handles extending the depth as needed. That way we can still have fast clones.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dang you are so wise @btkostner 🙇 . I looked up get changed files github actions
and got https://github.com/jitterbit/get-changed-files which has been out of date for 3+ years so I thought to go with some bash-magic I should have searched around a bit more.
But putting a positive spin on this, I learned a bunch about bash and github context in workflows.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated! ty for the grand suggestion again.
fixes #716
Updates GHA workflow to not use::set_output
(as that's a deprecated command) but push to$GITHUB_OUTPUT
and updates to create a comma separated list of files changed, and then explode that into a proper array when running the validation against it.Updates validate company GHA to use https://github.com/tj-actions/changed-files to address
::set_output
warning.also bumps
>> $GITHUB_OUTPUT