icssc / peterportal-api-next

API that provides easy access to public data from UC Irvine. Developed for Anteaters, by Anteaters.
https://docs.icssc.club/anteaterapi
MIT License
6 stars 0 forks source link

ci: :construction_worker: improve GitHub Actions workflows #76

Closed ap0nia closed 1 year ago

ap0nia commented 1 year ago

Summary

Features

Notes

The workflow files can't be renamed immediately, otherwise they won't be triggered since they don't exist on the main branch. Maybe open another PR with no-deploy to change the names afterward? Or push directly to main if you have admin permissions. skill issue; I swear I've been harassed by this random issue before lol

ecxyzzy commented 1 year ago

The workflow files can't be renamed immediately, otherwise they won't be triggered since they don't exist on the main branch. Maybe open another PR with no-deploy to change the names afterward? Or push directly to main if you have admin permissions.

Wait actually? I remember renaming conventional-pr.yml to lint-pr.yml for #69 and it ran fine on the PR.

ecxyzzy commented 1 year ago

Also is there a reason the lint-and-format-pr action didn't re-fire on PR name change? I tried rerunning it manually, but it seems to be using the old PR title for some reason.

ap0nia commented 1 year ago

I feel like that could've been the conventional-pr.yml running from the main branch; not the one running from the feature branch. i.e. It was running the old workflow that just did a conventional-commit check, instead of the linting + formatting/updating the PR title.

There's an open issue and the general consensus is to create a workflow file that exists on the main branch before testing it on development branches https://github.com/orgs/community/discussions/25746

I don't really get all these workflow shenanigans lol

ecxyzzy commented 1 year ago

Nope, it definitely ran the new workflow: https://github.com/icssc/peterportal-api-next/actions/runs/5859266473/job/15884907857 I think it should be fine if you rename the workflows on this branch.

ap0nia commented 1 year ago

Ok, let me try

ap0nia commented 1 year ago

Also is there a reason the lint-and-format-pr action didn't re-fire on PR name change? I tried rerunning it manually, but it seems to be using the old PR title for some reason.

Ok, so by default "runs on pull_request" means "opened, synchronize, or reopened" ; I added "edited" too

hm, it seems a caveat is that editing the PR body also causes the action to run; i.e. editing the PR title or body will cause it to check whether to update the title