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

Add check for actions triggered by cron #5641

Merged
merged 3 commits into from
Oct 18, 2023

Conversation

aramattamara
Copy link
Member

Improves #5639

What changes did you make?

  • Added check for actions triggered by cron.

Why did you make the changes (we will use this info to test)?

@github-actions
Copy link

github-actions bot commented Oct 2, 2023

Want to review this pull request? Take a look at this documentation for a step by step guide!

From your project repository, check out a new branch and test the changes.

git checkout -b aramattamara-gh-actions-triggers gh-pages
git pull https://github.com/aramattamara/website.git gh-actions-triggers

@t-will-gillis t-will-gillis added Bug Something isn't working role: back end/devOps Tasks for back-end developers Complexity: Small Take this type of issues after the successful merge of your second good first issue Feature: Refactor GHA Refactoring GitHub actions to fit latest architectural norms size: 0.25pt Can be done in 0.5 to 1.5 hours labels Oct 15, 2023
Copy link
Member

@t-will-gillis t-will-gillis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @aramattamara Thank you for the PR which appears to be a failsafe to prevent a GHA from running inadvertently when a dev has authorized a token in their personal repo with the same name as the HfLA token. I agree with you that this is a worthwhile and easy ‘safety’ measure.

For the schedule-monthly-PREV.yml file, ideally this will be deleted by PR #5467 before it is scheduled to run again on Nov 1st, but just in case it isn’t, this is an easy solution. Incidentally, to be doubly sure lines 4 & 5 can be replaced with workflow_dispatch:. (Of course, I should have done this from the beginning but I did not think the last PR was going to be active this long.)

For the schedule-fri-0700.yml, I don’t believe that the repo check is needed because the secrets.IN_PROGRESS_COLUMN_ID only refers to HfLA’s Project Board. Since the personal repos do not know this secret, they won’t trigger the action. For that reason, and since we have not tested to confirm that there are no unexpected results from adding the repo check, I do not believe we should update this GHA (If it ain’t broke…)

For the future, this will be a good reminder to make sure that scopes are set appropriately to prevent individuals from accidentally triggering GHAs- thank you for pointing this out.

If you could make the change(s) to schedule-monthly-PREV.yml, I can re-review and merge it.

I will add labels, and if you think of any notes to add to the description for clarification, please do.

Thanks!

@aramattamara
Copy link
Member Author

aramattamara commented Oct 18, 2023

Hi @t-will-gillis, thanks for your detailed feedback! I've implemented the changes you suggested in the schedule-monthly-PREV.yml. I've replaced lines 4 and 5 with workflow_dispatch.

I also reverted the schedule-fri-0700.yml, thanks.

@t-will-gillis t-will-gillis self-requested a review October 18, 2023 16:18
Copy link
Member

@t-will-gillis t-will-gillis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @aramattamara Thanks for the changes!

@t-will-gillis t-will-gillis merged commit 31d83b2 into hackforla:gh-pages Oct 18, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Complexity: Small Take this type of issues after the successful merge of your second good first issue Feature: Refactor GHA Refactoring GitHub actions to fit latest architectural norms role: back end/devOps Tasks for back-end developers size: 0.25pt Can be done in 0.5 to 1.5 hours
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants