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 Keepalive Workflow to Check GH Pages Version Workflow #21

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

MarcosG119
Copy link

@MarcosG119 MarcosG119 commented Apr 16, 2024

Fixes #6266

What changes did you make?

  • Added keepalive-workflow to last step of Check GH Pages Version Workflow in danielridgebot/check-ghpages-versions repo.

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

  • To avoid the workflows being disabled if repository is inactive for more than 60 days. Now the workflow will make a call to the GitHub API every 50 days to prevent the workflow from being disabled.

Screenshots of Proposed Changes Of The Website (if any, please do not screen shot code changes)

Visuals before changes are applied

No Visual Changes

Visuals after changes are applied

No Visual Changes

@gaylem
Copy link

gaylem commented May 12, 2024

Availability: M-F 11am - 6pm
ETA: Sunday May 19, 2024

@MarcosG119 and I will walk through this together tomorrow and I should have the review completed by the end of next weekend.

@danielridgebot danielridgebot self-requested a review May 14, 2024 18:30
Copy link
Owner

@danielridgebot danielridgebot left a comment

Choose a reason for hiding this comment

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

Hey @MarcosG119 -- great work on this issue!

  1. You checked all the main boxes: repo, linked issue, clear description.
  2. Your code is clean and makes sense according to the documentation.
  3. I was able to successfully test the workflow on my repo. The docker issue was created as expected, and if the version numbers were up to date, that step was skipped.
  4. The Keep Alive step ran successfully.
  5. The workflow ran as scheduled in my repo this afternoon.

Next Steps:

  1. I don't think there is a way to confirm that the Keep Alive workflow is really doing it's job until we go live and 50 days pass. Everything worked fine in my tests, and that step ran successfully, so I'm guessing we are good. We will just have to wait and see if the workflow is disabled again in the future due to inactivity.
  2. I think we need someone with more permissions to re-enable the workflow. I'll ask about that.
  3. I'm not sure about the merge process for this repo, so I'll ask about that, too.

Great work! 👍

@gaylem

@danielridgebot
Copy link
Owner

danielridgebot commented May 14, 2024

Hey @MarcosG119 I did just notice one thing, in the wiki, can you update the bullet you added?

"added keepalive-workflow to keep workflow active if repository is inactive for more than 60 days"

It should probably be changed to something like "added keepalive-workflow to check-gh-pages-version.yml to prevent the workflow from being disabled after 60 days of inactivity. Now the workflow will make a call to the GitHub API every 50 days to ensure it remains enabled."

I would make the change really quick but I don't seem to have access to update the readme. Thanks!

@gaylem

@danielridgebot
Copy link
Owner

danielridgebot commented May 14, 2024

Hey @MarcosG119, looks like I got more permissions and so I ran the workflow without your changes in production. I also checked the Daniel_Ridge_PA token in Settings and it's actually DANIEL_RIDGE_PA. I did that because the workflow threw this error:

https://github.com/danielridgebot/check-ghpages-versions/actions/runs/9084830387/job/24966704886

Maybe we need to change how the token is formatted in the workflow and see if that provides sufficient permissions?

@gaylem

@roslynwythe
Copy link

roslynwythe commented Jun 12, 2024

From https://github.com/danielridgebot/check-ghpages-versions/settings/secrets/actions, the action secret is DANIEL_RIDGE_PAT

Copy link

@roslynwythe roslynwythe left a comment

Choose a reason for hiding this comment

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

@MarcosG119 I need to request that you move the keepalive action to its own job. This is based on the statement "Moving the keepalive workflow into its own distinct job is strongly recommended for better security" in https://github.com/marketplace/actions/keepalive-workflow#how-to-use. An example is provided.

name: Github Action with a cronjob trigger
on:
  schedule:
    - cron: "0 0 * * *"
jobs:
  main-job:
    name: Main Job
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      # - step1
      # - step 2
      # - Step N
  keepalive-job:
    name: Keepalive Workflow
    runs-on: ubuntu-latest
    permissions:
      actions: write
    steps:
      - uses: actions/checkout@v4
      - uses: gautamkrishnar/keepalive-workflow@v2

@roslynwythe
Copy link

@MarcosG119 please advise if you will be able to continue work on this PR.

@roslynwythe
Copy link

roslynwythe commented Sep 30, 2024

I reached out to @MarcosG119 via Slack to see if he wants to continue work on this PR. The branch needs to be merged with updates from #23

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.

Implement "Keep-Alive" for Daniel Ridge bot so that Docker image will be updated
4 participants