-
Notifications
You must be signed in to change notification settings - Fork 36
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
Add actionlint to prevent GHA workflow errors #463
Conversation
@Czaki, actionlint fails with errors in these lines: docs/.github/workflows/build_and_deploy.yml Lines 109 to 114 in ffc22d0
which explains why the deployment with 0.5.0 only happened in dev and didn't go into a folder. Do you have ideas on how to fix it? |
TAG="${GITHUB_REF/refs\/tags\/v/}" | ||
VER="${TAG/a*/}" # remove alpha identifier | ||
VER="${VER/b*/}" # remove beta identifier | ||
VER="${VER/rc*/}" # remove rc identifier | ||
|
||
if [[ "$REF" == "refs/tags/v"* ]]; then | ||
echo "branch_name=$VER" >> "$GITHUB_ENV" | ||
else | ||
echo "branch_name=dev" >> $GITHUB_ENV | ||
echo "branch_name=dev" >> "$GITHUB_ENV" |
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.
ealier code have 2 problems.
- it will put
v0.5.1
as version instead of0.5.0
- it will create folders for rc, alpha and beta.
I think that this code should work. We may test it by creating 0.5.1b1 and check if 0.5.0
is available (still may be not selectable from dropdown).
# References and relevant issues Followup to napari/docs#463 # Description It looks like the condition from napari/docs#463 was never triggered, as base workflow in repository was triggered only by push to main branch, not on tag.
# References and relevant issues Followup to napari/docs#463 # Description It looks like the condition from napari/docs#463 was never triggered, as base workflow in repository was triggered only by push to main branch, not on tag.
This adds actionlint from napari/napari#7049 to help prevent errors in GHA workflows.
Update: @Czaki also fixed the errors found by actionlint and ensured that new docs builds from tags (a) end up in their own folder (rather than dev/), and (b) don't include alpha, beta and rc tags.