From 8de337e96718a5c0669e988f68563a1030f79fae Mon Sep 17 00:00:00 2001 From: Charles Ewert Date: Tue, 26 Nov 2024 09:43:02 -0500 Subject: [PATCH] refactor dependecy workflow so we only have 1 skipped check instead of 8 --- .github/workflows/_validate-dependencies.yml | 23 ++++++++++++++ .github/workflows/dependencies.yml | 10 ++++++ .github/workflows/validate-dependencies.yml | 32 -------------------- 3 files changed, 33 insertions(+), 32 deletions(-) create mode 100644 .github/workflows/_validate-dependencies.yml create mode 100644 .github/workflows/dependencies.yml delete mode 100644 .github/workflows/validate-dependencies.yml diff --git a/.github/workflows/_validate-dependencies.yml b/.github/workflows/_validate-dependencies.yml new file mode 100644 index 000000000..13408d513 --- /dev/null +++ b/.github/workflows/_validate-dependencies.yml @@ -0,0 +1,23 @@ +name: validate-dependencies + +on: + workflow_call: + +jobs: + lint-brightscript: + uses: ./.github/workflows/_lint-brightscript.yml + lint-json: + uses: ./.github/workflows/_lint-json.yml + lint-markdown: + uses: ./.github/workflows/_lint-markdown.yml + lint-spelling: + uses: ./.github/workflows/_lint-spelling.yml + lint-translation-files: + uses: ./.github/workflows/_lint-translation-files.yml + build-dev: + uses: ./.github/workflows/_build-dev.yml + build-prod: + uses: ./.github/workflows/_build-prod.yml + roku-analysis: + uses: ./.github/workflows/_roku-analysis.yml + diff --git a/.github/workflows/dependencies.yml b/.github/workflows/dependencies.yml new file mode 100644 index 000000000..1d0de36dc --- /dev/null +++ b/.github/workflows/dependencies.yml @@ -0,0 +1,10 @@ +name: dependencies + +on: + pull_request: + types: [labeled, opened, synchronize, reopened] + +jobs: + validate: + if: contains(github.event.pull_request.labels.*.name, 'dependencies') + uses: ./.github/workflows/_validate-dependencies.yml diff --git a/.github/workflows/validate-dependencies.yml b/.github/workflows/validate-dependencies.yml deleted file mode 100644 index 053c98e25..000000000 --- a/.github/workflows/validate-dependencies.yml +++ /dev/null @@ -1,32 +0,0 @@ -name: validate-dependencies - -on: - pull_request: - types: [labeled, opened, synchronize, reopened] - -jobs: - lint-brightscript: - if: contains(github.event.pull_request.labels.*.name, 'dependencies') - uses: ./.github/workflows/_lint-brightscript.yml - lint-json: - if: contains(github.event.pull_request.labels.*.name, 'dependencies') - uses: ./.github/workflows/_lint-json.yml - lint-markdown: - if: contains(github.event.pull_request.labels.*.name, 'dependencies') - uses: ./.github/workflows/_lint-markdown.yml - lint-spelling: - if: contains(github.event.pull_request.labels.*.name, 'dependencies') - uses: ./.github/workflows/_lint-spelling.yml - lint-translation-files: - if: contains(github.event.pull_request.labels.*.name, 'dependencies') - uses: ./.github/workflows/_lint-translation-files.yml - build-dev: - if: contains(github.event.pull_request.labels.*.name, 'dependencies') - uses: ./.github/workflows/_build-dev.yml - build-prod: - if: contains(github.event.pull_request.labels.*.name, 'dependencies') - uses: ./.github/workflows/_build-prod.yml - roku-analysis: - if: contains(github.event.pull_request.labels.*.name, 'dependencies') - uses: ./.github/workflows/_roku-analysis.yml -