From ac52af476a6a5c6dc3e940499c74255501fa2939 Mon Sep 17 00:00:00 2001 From: Kuchenpirat Date: Wed, 9 Oct 2024 11:40:26 +0000 Subject: [PATCH 1/6] cancel running pull request jobs on new push --- .github/workflows/pull-requests.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/pull-requests.yml b/.github/workflows/pull-requests.yml index d6d9cfdbe5c..787965fc60d 100644 --- a/.github/workflows/pull-requests.yml +++ b/.github/workflows/pull-requests.yml @@ -5,6 +5,10 @@ on: branches: - mealie-next +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number }} + cancel-in-progress: true + jobs: pull-request-lint: name: "Lint PR" From cbac929dbd40a279879477b013f500cf416e97ef Mon Sep 17 00:00:00 2001 From: Kuchenpirat Date: Wed, 9 Oct 2024 11:46:30 +0000 Subject: [PATCH 2/6] add e2e --- .github/workflows/e2e.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index cda1274478e..ad9e8f3d2d7 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -3,6 +3,11 @@ on: pull_request: branches: - mealie-next + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number }} + cancel-in-progress: true + jobs: test: timeout-minutes: 60 From eb61b33cdb38b89a5f2d8d1f15c36582f1f24b2d Mon Sep 17 00:00:00 2001 From: Kuchenpirat Date: Wed, 9 Oct 2024 11:52:43 +0000 Subject: [PATCH 3/6] move to workflow call --- .github/workflows/codeql.yml | 3 +-- .github/workflows/e2e.yml | 8 +------- .github/workflows/pull-requests.yml | 8 ++++++++ 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 866eef9635a..410512feae3 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -14,10 +14,9 @@ name: "CodeQL" on: push: branches: [ "mealie-next" ] - pull_request: - branches: [ "mealie-next" ] schedule: - cron: '36 9 * * 3' + workflow_call: jobs: analyze: diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index ad9e8f3d2d7..48d0208112c 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -1,12 +1,6 @@ name: E2E Tests on: - pull_request: - branches: - - mealie-next - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number }} - cancel-in-progress: true + workflow_call: jobs: test: diff --git a/.github/workflows/pull-requests.yml b/.github/workflows/pull-requests.yml index 787965fc60d..9a0ce9ba9cb 100644 --- a/.github/workflows/pull-requests.yml +++ b/.github/workflows/pull-requests.yml @@ -25,3 +25,11 @@ jobs: container-scanning: name: "Trivy Container Scanning" uses: ./.github/workflows/partial-trivy-container-scanning.yml + + end-to-end: + name: "End-to-End Tests" + uses: ./.github/workflows/e2e.yml + + code-ql: + name: "CodeQL" + uses: ./.github/workflows/codeql.yml From 8fc4ddc1a9034ab2152c07eb832248a0478f458c Mon Sep 17 00:00:00 2001 From: Michael Genson <71845777+michael-genson@users.noreply.github.com> Date: Wed, 9 Oct 2024 14:24:11 +0000 Subject: [PATCH 4/6] temp change --- .github/workflows/codeql.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 410512feae3..49af2c4e174 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -21,7 +21,7 @@ on: jobs: analyze: name: Analyze - # Runner size impacts CodeQL analysis time. To learn more, please see: + # Runner size impacts CodeQL analysis time. To learn more, please see: (tmp change) # - https://gh.io/recommended-hardware-resources-for-running-codeql # - https://gh.io/supported-runners-and-hardware-resources # - https://gh.io/using-larger-runners From 5aa180cfa4d729caa77bf6ea67b0b0e661aa4ae4 Mon Sep 17 00:00:00 2001 From: Michael Genson <71845777+michael-genson@users.noreply.github.com> Date: Wed, 9 Oct 2024 14:24:22 +0000 Subject: [PATCH 5/6] revert temp change --- .github/workflows/codeql.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 49af2c4e174..410512feae3 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -21,7 +21,7 @@ on: jobs: analyze: name: Analyze - # Runner size impacts CodeQL analysis time. To learn more, please see: (tmp change) + # Runner size impacts CodeQL analysis time. To learn more, please see: # - https://gh.io/recommended-hardware-resources-for-running-codeql # - https://gh.io/supported-runners-and-hardware-resources # - https://gh.io/using-larger-runners From bb359226aa1fcb4853763f6b6dde86e8ba92b122 Mon Sep 17 00:00:00 2001 From: Kuchenpirat Date: Wed, 9 Oct 2024 14:42:15 +0000 Subject: [PATCH 6/6] update permissons for codeql --- .github/workflows/pull-requests.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/pull-requests.yml b/.github/workflows/pull-requests.yml index 9a0ce9ba9cb..ad2fa13e3d2 100644 --- a/.github/workflows/pull-requests.yml +++ b/.github/workflows/pull-requests.yml @@ -33,3 +33,7 @@ jobs: code-ql: name: "CodeQL" uses: ./.github/workflows/codeql.yml + permissions: + actions: read + contents: read + security-events: write