diff --git a/.github/workflows/t1-failure-no-tag.yml b/.github/workflows/t1-failure-no-tag.yml index 9469480..6fa2f50 100644 --- a/.github/workflows/t1-failure-no-tag.yml +++ b/.github/workflows/t1-failure-no-tag.yml @@ -5,8 +5,6 @@ on: jobs: testJob: runs-on: [ - "self-hosted", - "anka", "anka-template:d792c6f6-198c-470f-9526-9c998efe7ab4", "anka-template-tag:not-a-tag", ] diff --git a/.github/workflows/t1-failure-no-template.yml b/.github/workflows/t1-failure-no-template.yml index 2be5bc8..4cd6f3b 100644 --- a/.github/workflows/t1-failure-no-template.yml +++ b/.github/workflows/t1-failure-no-template.yml @@ -5,8 +5,6 @@ on: jobs: testJob: runs-on: [ - "self-hosted", - "anka", "anka-template:c092c6f6-198c-470f-9526-9c998efe7ab5", "anka-template-tag:vanilla+port-forward-22+brew-git", ] diff --git a/.github/workflows/t1-failure-tag-1-in-vm.yml b/.github/workflows/t1-failure-tag-1-in-vm.yml index b3c5c5e..fb17c4d 100644 --- a/.github/workflows/t1-failure-tag-1-in-vm.yml +++ b/.github/workflows/t1-failure-tag-1-in-vm.yml @@ -5,8 +5,6 @@ on: jobs: testJob: runs-on: [ - "self-hosted", - "anka", "anka-template:d792c6f6-198c-470f-9526-9c998efe7ab4", "anka-template-tag:vanilla+port-forward-22+brew-git", ] diff --git a/.github/workflows/t1-with-tag-1-matrix-nodes-2.yml b/.github/workflows/t1-with-tag-1-matrix-nodes-2.yml index e5bae1e..168b995 100644 --- a/.github/workflows/t1-with-tag-1-matrix-nodes-2.yml +++ b/.github/workflows/t1-with-tag-1-matrix-nodes-2.yml @@ -8,8 +8,6 @@ jobs: matrix: node: ["1", "2"] runs-on: [ - "self-hosted", - "anka", "anka-template:d792c6f6-198c-470f-9526-9c998efe7ab4", "anka-template-tag:vanilla+port-forward-22+brew-git", "unique-id:${{ github.run_id }}-${{ matrix.node }}", diff --git a/.github/workflows/t1-with-tag-1.yml b/.github/workflows/t1-with-tag-1.yml index 9f0e1e3..b4520f5 100644 --- a/.github/workflows/t1-with-tag-1.yml +++ b/.github/workflows/t1-with-tag-1.yml @@ -5,8 +5,6 @@ on: jobs: t1-with-tag-1: runs-on: [ - "self-hosted", - "anka", "anka-template:d792c6f6-198c-470f-9526-9c998efe7ab4", "anka-template-tag:vanilla+port-forward-22+brew-git", ] diff --git a/.github/workflows/t1-with-tag-2.yml b/.github/workflows/t1-with-tag-2.yml index 621912b..cc8beb9 100644 --- a/.github/workflows/t1-with-tag-2.yml +++ b/.github/workflows/t1-with-tag-2.yml @@ -5,8 +5,6 @@ on: jobs: testJob: runs-on: [ - "self-hosted", - "anka", "anka-template:d792c6f6-198c-470f-9526-9c998efe7ab4", "anka-template-tag:vanilla+port-forward-22", ] diff --git a/.github/workflows/t1-without-tag.yml b/.github/workflows/t1-without-tag.yml index fca87d5..2fa1c58 100644 --- a/.github/workflows/t1-without-tag.yml +++ b/.github/workflows/t1-without-tag.yml @@ -5,8 +5,6 @@ on: jobs: testJob: runs-on: [ - "self-hosted", - "anka", "anka-template:d792c6f6-198c-470f-9526-9c998efe7ab4", ] steps: diff --git a/.github/workflows/t2-dual-without-tag.yml b/.github/workflows/t2-dual-without-tag.yml index f362b92..e3d0ea6 100644 --- a/.github/workflows/t2-dual-without-tag.yml +++ b/.github/workflows/t2-dual-without-tag.yml @@ -5,8 +5,6 @@ on: jobs: testJob: runs-on: [ - "self-hosted", - "anka", "anka-template:d792c6f6-198c-470f-9526-9c998efe7ab4", ] steps: @@ -18,8 +16,6 @@ jobs: echo "123" testJob2: runs-on: [ - "self-hosted", - "anka", "anka-template:6abae54f-025d-4a27-b5eb-b985d5eddac9", ] steps: diff --git a/VERSION b/VERSION index fab77af..899f24f 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.8.3 \ No newline at end of file +0.9.0 \ No newline at end of file diff --git a/plugins/handlers/github/README.md b/plugins/handlers/github/README.md index ae53e3b..323fcfe 100644 --- a/plugins/handlers/github/README.md +++ b/plugins/handlers/github/README.md @@ -56,8 +56,6 @@ on: jobs: testJob: runs-on: [ - "self-hosted", - "anka", "anka-template:d792c6f6-198c-470f-9526-9c998efe7ab4", "anka-template-tag:vanilla+port-forward-22+brew-git", ] diff --git a/plugins/receivers/github/github.go b/plugins/receivers/github/github.go index 747193b..ddbdcff 100644 --- a/plugins/receivers/github/github.go +++ b/plugins/receivers/github/github.go @@ -31,11 +31,11 @@ func NewServer(port string) *Server { } } -func exists_in_array_exact(array_to_search_in []string, desired []string) bool { +func exists_in_array_partial(array_to_search_in []string, desired []string) bool { for _, desired_string := range desired { found := false for _, item := range array_to_search_in { - if item == desired_string { + if strings.Contains(item, desired_string) { found = true break } @@ -203,9 +203,11 @@ func Run( "workflowJob.Action", *workflowJob.Action, "workflowJob.WorkflowJob.Labels", workflowJob.WorkflowJob.Labels, "workflowJob.WorkflowJob.ID", *workflowJob.WorkflowJob.ID, + "workflowJob.WorkflowJob.Name", *workflowJob.WorkflowJob.Name, + "workflowJob.WorkflowJob.RunID", *workflowJob.WorkflowJob.RunID, ) if *workflowJob.Action == "queued" { - if exists_in_array_exact(workflowJob.WorkflowJob.Labels, []string{"self-hosted", "anka"}) { + if exists_in_array_partial(workflowJob.WorkflowJob.Labels, []string{"anka-template"}) { // make sure it doesn't already exist inQueue, err := InQueue(pluginCtx, logger, *workflowJob.WorkflowJob.ID, "anklet/jobs/github/queued/"+ctxPlugin.Owner) if err != nil { @@ -241,7 +243,7 @@ func Run( } } } else if *workflowJob.Action == "completed" { - if exists_in_array_exact(workflowJob.WorkflowJob.Labels, []string{"self-hosted", "anka"}) { + if exists_in_array_partial(workflowJob.WorkflowJob.Labels, []string{"anka-template"}) { queues := []string{} // get all keys from database for the main queue and service queues as well as completed @@ -431,7 +433,7 @@ func Run( doneWithHooks = true break } - if !exists_in_array_exact(workflowJobEvent.WorkflowJob.Labels, []string{"self-hosted", "anka"}) { + if !exists_in_array_partial(workflowJobEvent.WorkflowJob.Labels, []string{"anka-template"}) { continue } allHooks = append(allHooks, map[string]interface{}{