1
0
mirror of https://github.com/facebook/proxygen.git synced 2025-08-07 07:02:53 +03:00

Rebuild GitHub Actions workflows

Summary:
X-link: https://github.com/facebookincubator/zstrong/pull/749

Updating generated workflow files to account for recent changes. Most notably, this updates the checkout action to v4 and sets an explicit read-only permission.

This also adds support for `--cron` in the codegen to account for only running CI on a schedule (useful for managing costs).

Reviewed By: ahornby

Differential Revision: D56165825

fbshipit-source-id: 298b16effefb6b8a2dc6cbcf07d4ec4a61f48364
This commit is contained in:
Paul O'Shannessy
2024-04-24 15:36:57 -07:00
committed by Facebook GitHub Bot
parent 5cea6ffcc1
commit 4efce72184
3 changed files with 17 additions and 2 deletions

View File

@@ -944,6 +944,11 @@ class GenerateGitHubActionsCmd(ProjectCmdBase):
def get_run_on(self, args):
if args.run_on_all_branches:
return self.RUN_ON_ALL
if args.cron:
return f"""
schedule:
- cron: '{args.cron}'"""
return f"""
push:
branches:
@@ -1213,6 +1218,10 @@ jobs:
parser.add_argument(
"--ubuntu-version", default="20.04", help="Version of Ubuntu to use"
)
parser.add_argument(
"--cron",
help="Specify that the job runs on a cron schedule instead of on pushes",
)
parser.add_argument(
"--main-branch",
default="main",