From 6f6b821697b375de945bc766e7e63472c6453f5e Mon Sep 17 00:00:00 2001 From: Ben Hale Date: Thu, 5 Nov 2020 07:11:17 -0800 Subject: [PATCH] Build On Descriptor Change This change updates the update-pipeline workflow to trigger any time the descriptor changes, in addition to the times previously did. Signed-off-by: Ben Hale --- .github/workflows/update-pipeline.yml | 5 +++++ octo/update_pipeline.go | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/.github/workflows/update-pipeline.yml b/.github/workflows/update-pipeline.yml index 6efd6028..9e758c8a 100644 --- a/.github/workflows/update-pipeline.yml +++ b/.github/workflows/update-pipeline.yml @@ -1,5 +1,10 @@ name: Update Pipeline "on": + push: + branches: + - main + paths: + - .github/pipeline-descriptor.yml schedule: - cron: 0 5 * * 1-5 workflow_dispatch: {} diff --git a/octo/update_pipeline.go b/octo/update_pipeline.go index 1b3152ef..09947642 100644 --- a/octo/update_pipeline.go +++ b/octo/update_pipeline.go @@ -27,6 +27,10 @@ func ContributeUpdatePipeline(descriptor Descriptor) (Contribution, error) { w := actions.Workflow{ Name: "Update Pipeline", On: map[event.Type]event.Event{ + event.PushType: event.Push{ + Branches: []string{"main"}, + Paths: []string{filepath.Join(".github", "pipeline-descriptor.yml")}, + }, event.ScheduleType: event.Schedule{{Minute: "0", Hour: "5", DayOfWeek: "1-5"}}, event.WorkflowDispatchType: event.WorkflowDispatch{}, },