mage-os / terraform

Terraform files for managing the organization repository permissions.
4 stars 8 forks source link

Workflows On Inactive Repositories Should Remain Enabled #73

Open sprankhub opened 12 months ago

sprankhub commented 12 months ago

According to observations by @Vinai, scheduled workflows on inactive repositories seem to be disabled automatically. This is also mentioned in the docs:

Warning: To prevent unnecessary workflow runs, scheduled workflows may be disabled automatically. When a public repository is forked, scheduled workflows are disabled by default. In a public repository, scheduled workflows are automatically disabled when no repository activity has occurred in 60 days.

This is an issue for us, because we have repositories with no activity in a long time, but we need the scheduled workflow to merge upstream changes nevertheless. There seem to be only two solutions:

  1. Create empty dummy commits to pretend activity. This is e.g. implemented in https://github.com/marketplace/actions/keepalive-workflow. However, we should not have any dummy commits in our repositories.
  2. Enable the workflow again after it has been disabled. I only found an AWS solution for this. In general, we could use the REST API to enable the workflow again as soon as it has been disabled. However, this seems to not be supported by Terraform yet, so we might want to create a separate GitHub Action for this?