relaton / support

Internal repository support for Relaton
0 stars 0 forks source link

Scheduled workflows are automatically disabled #7

Closed andrew2net closed 1 year ago

andrew2net commented 1 year ago

As per https://docs.github.com/en/actions/managing-workflow-runs/disabling-and-enabling-a-workflow scheduled workflows are automatically disabled when no repository activity has occurred in 60 days. It means a repository should have at least one commit in 60 days. To solve this problem the flag.txt file was added. The file was updated every time action ran. https://github.com/relaton/support/blob/92f27b5b390590d67d470a720e09a72a17fc3029/.github/workflows/crawler.yml#L40-L41 But now the flag.txt file is updated only if there are any changes in the repo. So the file doesn't do the job it was introduced for. We need to update the flag.txt file even if there aren't any other changes in the repo. I agree that making an empty commit every day is too much. It would be great if the action can parse a date from the flag.txt and make an empty commit only if it is 59 days old.

UPD there is an action that keeps workflow alive https://github.com/marketplace/actions/keepalive-workflow

ronaldtse commented 1 year ago

Why don’t we just use the GHA action that automatically extends?

andrew2net commented 1 year ago

@ronaldtse yes, we should move to the action. I just didn't find it when we encountered the issue.

CAMOBAP commented 1 year ago

I will add a described workflow as a separate keep-alive.yml so we will be able to integrate it independently

andrew2net commented 1 year ago

I will add a described workflow as a separate keep-alive.yml so we will be able to integrate it independently

@CAMOBAP thank you. In this case, we can remove the flag.txt.

CAMOBAP commented 1 year ago

Additionally, to keep-alive workflows I refactored some workflows to avoid duplication:

@andrew2net I need your help with reviews of:

@andrew2net also feel free to report issues for me in relaton/support if some workflows aren't flexible enough. I will try to extend them to minimize duplication of the CI configuration

@ronaldtse could you please give me write access

To be fixed (by me):

CAMOBAP commented 1 year ago

All data repos now have keep-aliwe workflow