From 8084f98d454752f435e70b84e4fcd921d2387bca Mon Sep 17 00:00:00 2001 From: Charles Ewert Date: Tue, 26 Nov 2024 09:02:19 -0500 Subject: [PATCH 1/5] make workflows reuseable --- .github/actions/build-dev.yml | 27 +++++++++++++ .github/actions/build-prod.yml | 27 +++++++++++++ .github/actions/lint-brightscript.yml | 18 +++++++++ .github/actions/lint-json.yml | 21 ++++++++++ .github/actions/lint-markdown.yml | 22 +++++++++++ .github/actions/lint-spelling.yml | 21 ++++++++++ .github/actions/lint-translation-files.yml | 24 ++++++++++++ .github/actions/roku-analysis.yml | 40 ++++++++++++++++++++ .github/workflows/build-dev.yml | 21 +--------- .github/workflows/build-prod.yml | 20 +--------- .github/workflows/lint-brightscript.yml | 12 +----- .github/workflows/lint-json.yml | 15 +------- .github/workflows/lint-markdown.yml | 16 +------- .github/workflows/lint-spelling.yml | 15 +------- .github/workflows/lint-translation-files.yml | 18 +-------- .github/workflows/roku-analysis.yml | 31 +-------------- 16 files changed, 208 insertions(+), 140 deletions(-) create mode 100644 .github/actions/build-dev.yml create mode 100644 .github/actions/build-prod.yml create mode 100644 .github/actions/lint-brightscript.yml create mode 100644 .github/actions/lint-json.yml create mode 100644 .github/actions/lint-markdown.yml create mode 100644 .github/actions/lint-spelling.yml create mode 100644 .github/actions/lint-translation-files.yml create mode 100644 .github/actions/roku-analysis.yml diff --git a/.github/actions/build-dev.yml b/.github/actions/build-dev.yml new file mode 100644 index 000000000..449f7906d --- /dev/null +++ b/.github/actions/build-dev.yml @@ -0,0 +1,27 @@ +name: build-dev + +on: + workflow_call: + +jobs: + dev: + # prevent job from running twice when a PR pushes a new commit + if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 + - uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4 + with: + node-version: "lts/*" + cache: "npm" + - name: NPM install + run: npm ci + - name: Install roku module dependencies + run: npm run ropm + - name: Build app + run: npm run build + - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4 + with: + name: Jellyfin-Roku-dev-${{ github.sha }} + path: ${{ github.workspace }}/build/staging + if-no-files-found: error diff --git a/.github/actions/build-prod.yml b/.github/actions/build-prod.yml new file mode 100644 index 000000000..0e2f41146 --- /dev/null +++ b/.github/actions/build-prod.yml @@ -0,0 +1,27 @@ +# Builds the production version of the app +name: build-prod + +on: + workflow_call: + +jobs: + prod: + if: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'release-prep') }} + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 + - uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4 + with: + node-version: "lts/*" + cache: "npm" + - name: NPM install + run: npm ci + - name: Install roku module dependencies + run: npm run ropm + - name: Build app for production + run: npm run build-prod + - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4 + with: + name: Jellyfin-Roku-v${{ env.newManVersion }}-${{ github.sha }} + path: ${{ github.workspace }}/build/staging + if-no-files-found: error diff --git a/.github/actions/lint-brightscript.yml b/.github/actions/lint-brightscript.yml new file mode 100644 index 000000000..5e7363f9a --- /dev/null +++ b/.github/actions/lint-brightscript.yml @@ -0,0 +1,18 @@ +name: lint-brightscript + +on: + workflow_call: + +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + - uses: actions/setup-node@master + with: + node-version: "lts/*" + cache: "npm" + - run: npm ci + - run: npx ropm install + - run: npm run validate + - run: npm run check-formatting diff --git a/.github/actions/lint-json.yml b/.github/actions/lint-json.yml new file mode 100644 index 000000000..2597b54d8 --- /dev/null +++ b/.github/actions/lint-json.yml @@ -0,0 +1,21 @@ +name: lint-json + +on: + workflow_call: + +jobs: + run: + runs-on: ubuntu-latest + steps: + - name: Clone github repo + uses: actions/checkout@master + - uses: actions/setup-node@master + with: + node-version: "lts/*" + cache: "npm" + - name: Install npm dependencies + run: npm ci + - name: Install roku package dependencies + run: npx ropm install + - name: Validate JSON syntax + run: npm run lint-json \ No newline at end of file diff --git a/.github/actions/lint-markdown.yml b/.github/actions/lint-markdown.yml new file mode 100644 index 000000000..4080166a6 --- /dev/null +++ b/.github/actions/lint-markdown.yml @@ -0,0 +1,22 @@ +name: lint-markdown + +on: + workflow_call: + +jobs: + run: + runs-on: ubuntu-latest + steps: + - name: Clone github repo + uses: actions/checkout@master + - uses: actions/setup-node@master + with: + node-version: "lts/*" + cache: "npm" + - name: Install npm dependencies + run: npm ci + - name: Install roku package dependencies + run: npx ropm install + - uses: xt0rted/markdownlint-problem-matcher@1a5fabfb577370cfdf5af944d418e4be3ea06f27 # v3 + - name: Lint markdown files + run: npm run lint-markdown diff --git a/.github/actions/lint-spelling.yml b/.github/actions/lint-spelling.yml new file mode 100644 index 000000000..d73a9f459 --- /dev/null +++ b/.github/actions/lint-spelling.yml @@ -0,0 +1,21 @@ +name: lint-spelling + +on: + workflow_call: + +jobs: + run: + runs-on: ubuntu-latest + steps: + - name: Clone github repo + uses: actions/checkout@master + - uses: actions/setup-node@master + with: + node-version: "lts/*" + cache: "npm" + - name: Install npm dependencies + run: npm ci + - name: Install roku package dependencies + run: npx ropm install + - name: Check markdown files for spelling errors + run: npm run lint-spelling diff --git a/.github/actions/lint-translation-files.yml b/.github/actions/lint-translation-files.yml new file mode 100644 index 000000000..2f7abab3a --- /dev/null +++ b/.github/actions/lint-translation-files.yml @@ -0,0 +1,24 @@ +name: lint-translation-files + +on: + workflow_call: + +jobs: + run: + runs-on: ubuntu-latest + steps: + - name: Clone github repo + uses: actions/checkout@master + - name: Install xmllint and xmlstarlet using apt (from cache) + uses: awalsh128/cache-apt-pkgs-action@latest + with: + packages: libxml2-utils xmlstarlet + - name: Validate XML syntax + run: xmllint --noout ./locale/en_US/translations.ts + - name: Save output of duplicate check + run: echo "tsDuplicates=$(xmlstarlet sel -t -m '/TS/context/message/source' -c '.' -nl ./locale/en_US/translations.ts | sort | uniq -d | awk '{ printf "%s", $0 }')" >> $GITHUB_ENV + - name: Check for duplicates + run: xmlstarlet sel -t -m '/TS/context/message/source' -f -o ' ' -c '.' -nl ./locale/en_US/translations.ts | sort | uniq -d + - name: Duplicates found + if: env.tsDuplicates != '' + run: exit 1 diff --git a/.github/actions/roku-analysis.yml b/.github/actions/roku-analysis.yml new file mode 100644 index 000000000..d0826a334 --- /dev/null +++ b/.github/actions/roku-analysis.yml @@ -0,0 +1,40 @@ +name: roku-analysis + +on: + workflow_call: + +env: + BRANCH_NAME: ${{ github.head_ref || github.ref_name }} + +jobs: + static: + # don't run job on forks and prevent job from running twice when a PR pushes a new commit + if: github.repository == 'jellyfin/jellyfin-roku' && github.event_name != 'pull_request' || github.repository == 'jellyfin/jellyfin-roku' && github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 + - uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4 + with: + node-version: "lts/*" + cache: "npm" + - name: NPM install + run: npm ci + - name: Install roku module dependencies + run: npm run ropm + - name: Build dev app + if: env.BRANCH_NAME != 'master' + run: npm run build + - name: Build app for production + if: env.BRANCH_NAME == 'master' + run: npm run build-prod + - name: Setup Java + uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b # v4 + with: + distribution: "temurin" + java-version: "21" + - name: Download the Static Channel Analysis CLI + run: | + curl -sSL "https://devtools.web.roku.com/static-channel-analysis/sca-cmd.zip" -o sca-cmd.zip + unzip sca-cmd.zip + - name: Run Roku Static Analysis + run: ./sca-cmd/bin/sca-cmd ${{ github.workspace }}/build/staging --exit error diff --git a/.github/workflows/build-dev.yml b/.github/workflows/build-dev.yml index 70cb8b70d..ac9b7414f 100644 --- a/.github/workflows/build-dev.yml +++ b/.github/workflows/build-dev.yml @@ -6,23 +6,4 @@ on: jobs: dev: - # prevent job from running twice when a PR pushes a new commit - if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 - - uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4 - with: - node-version: "lts/*" - cache: "npm" - - name: NPM install - run: npm ci - - name: Install roku module dependencies - run: npm run ropm - - name: Build app - run: npm run build - - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4 - with: - name: Jellyfin-Roku-dev-${{ github.sha }} - path: ${{ github.workspace }}/build/staging - if-no-files-found: error + uses: ./.github/actions/build-dev.yml diff --git a/.github/workflows/build-prod.yml b/.github/workflows/build-prod.yml index c2575989a..4bca6a3f4 100644 --- a/.github/workflows/build-prod.yml +++ b/.github/workflows/build-prod.yml @@ -9,22 +9,4 @@ on: jobs: prod: - if: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'release-prep') }} - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 - - uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4 - with: - node-version: "lts/*" - cache: "npm" - - name: NPM install - run: npm ci - - name: Install roku module dependencies - run: npm run ropm - - name: Build app for production - run: npm run build-prod - - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4 - with: - name: Jellyfin-Roku-v${{ env.newManVersion }}-${{ github.sha }} - path: ${{ github.workspace }}/build/staging - if-no-files-found: error + uses: ./.github/actions/build-prod.yml diff --git a/.github/workflows/lint-brightscript.yml b/.github/workflows/lint-brightscript.yml index 560bfd8be..5dc3c9b4b 100644 --- a/.github/workflows/lint-brightscript.yml +++ b/.github/workflows/lint-brightscript.yml @@ -7,14 +7,4 @@ on: jobs: run: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@master - - uses: actions/setup-node@master - with: - node-version: "lts/*" - cache: "npm" - - run: npm ci - - run: npx ropm install - - run: npm run validate - - run: npm run check-formatting + uses: ./.github/actions/lint-brightscript.yml diff --git a/.github/workflows/lint-json.yml b/.github/workflows/lint-json.yml index a5b9f9080..33406f56d 100644 --- a/.github/workflows/lint-json.yml +++ b/.github/workflows/lint-json.yml @@ -7,17 +7,4 @@ on: jobs: run: - runs-on: ubuntu-latest - steps: - - name: Clone github repo - uses: actions/checkout@master - - uses: actions/setup-node@master - with: - node-version: "lts/*" - cache: "npm" - - name: Install npm dependencies - run: npm ci - - name: Install roku package dependencies - run: npx ropm install - - name: Validate JSON syntax - run: npm run lint-json \ No newline at end of file + uses: ./.github/actions/lint-json.yml \ No newline at end of file diff --git a/.github/workflows/lint-markdown.yml b/.github/workflows/lint-markdown.yml index a3a0f1a28..8d0ff00dd 100644 --- a/.github/workflows/lint-markdown.yml +++ b/.github/workflows/lint-markdown.yml @@ -6,18 +6,4 @@ on: jobs: run: - runs-on: ubuntu-latest - steps: - - name: Clone github repo - uses: actions/checkout@master - - uses: actions/setup-node@master - with: - node-version: "lts/*" - cache: "npm" - - name: Install npm dependencies - run: npm ci - - name: Install roku package dependencies - run: npx ropm install - - uses: xt0rted/markdownlint-problem-matcher@1a5fabfb577370cfdf5af944d418e4be3ea06f27 # v3 - - name: Lint markdown files - run: npm run lint-markdown + uses: ./.github/actions/lint-markdown.yml diff --git a/.github/workflows/lint-spelling.yml b/.github/workflows/lint-spelling.yml index c2c9b8545..875d5a52b 100644 --- a/.github/workflows/lint-spelling.yml +++ b/.github/workflows/lint-spelling.yml @@ -6,17 +6,4 @@ on: jobs: run: - runs-on: ubuntu-latest - steps: - - name: Clone github repo - uses: actions/checkout@master - - uses: actions/setup-node@master - with: - node-version: "lts/*" - cache: "npm" - - name: Install npm dependencies - run: npm ci - - name: Install roku package dependencies - run: npx ropm install - - name: Check markdown files for spelling errors - run: npm run lint-spelling + uses: ./.github/actions/lint-spelling.yml diff --git a/.github/workflows/lint-translation-files.yml b/.github/workflows/lint-translation-files.yml index 011547e4c..965e49a50 100644 --- a/.github/workflows/lint-translation-files.yml +++ b/.github/workflows/lint-translation-files.yml @@ -6,20 +6,4 @@ on: jobs: run: - runs-on: ubuntu-latest - steps: - - name: Clone github repo - uses: actions/checkout@master - - name: Install xmllint and xmlstarlet using apt (from cache) - uses: awalsh128/cache-apt-pkgs-action@latest - with: - packages: libxml2-utils xmlstarlet - - name: Validate XML syntax - run: xmllint --noout ./locale/en_US/translations.ts - - name: Save output of duplicate check - run: echo "tsDuplicates=$(xmlstarlet sel -t -m '/TS/context/message/source' -c '.' -nl ./locale/en_US/translations.ts | sort | uniq -d | awk '{ printf "%s", $0 }')" >> $GITHUB_ENV - - name: Check for duplicates - run: xmlstarlet sel -t -m '/TS/context/message/source' -f -o ' ' -c '.' -nl ./locale/en_US/translations.ts | sort | uniq -d - - name: Duplicates found - if: env.tsDuplicates != '' - run: exit 1 + uses: ./.github/actions/lint-translation-files.yml diff --git a/.github/workflows/roku-analysis.yml b/.github/workflows/roku-analysis.yml index 8a3b772f3..efe16486f 100644 --- a/.github/workflows/roku-analysis.yml +++ b/.github/workflows/roku-analysis.yml @@ -8,33 +8,4 @@ env: jobs: static: - # don't run job on forks and prevent job from running twice when a PR pushes a new commit - if: github.repository == 'jellyfin/jellyfin-roku' && github.event_name != 'pull_request' || github.repository == 'jellyfin/jellyfin-roku' && github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 - - uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4 - with: - node-version: "lts/*" - cache: "npm" - - name: NPM install - run: npm ci - - name: Install roku module dependencies - run: npm run ropm - - name: Build dev app - if: env.BRANCH_NAME != 'master' - run: npm run build - - name: Build app for production - if: env.BRANCH_NAME == 'master' - run: npm run build-prod - - name: Setup Java - uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b # v4 - with: - distribution: "temurin" - java-version: "21" - - name: Download the Static Channel Analysis CLI - run: | - curl -sSL "https://devtools.web.roku.com/static-channel-analysis/sca-cmd.zip" -o sca-cmd.zip - unzip sca-cmd.zip - - name: Run Roku Static Analysis - run: ./sca-cmd/bin/sca-cmd ${{ github.workspace }}/build/staging --exit error + uses: ./.github/actions/roku-analysis.yml From 50a12677822164483431520639e723a5ee803986 Mon Sep 17 00:00:00 2001 From: Charles Ewert Date: Tue, 26 Nov 2024 09:15:56 -0500 Subject: [PATCH 2/5] create workflow to validate dependency bump PRs don't break anything --- .github/workflows/validate-dependencies.yml | 32 +++++++++++++++++++++ 1 file changed, 32 insertions(+) create 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..5bb6f7797 --- /dev/null +++ b/.github/workflows/validate-dependencies.yml @@ -0,0 +1,32 @@ +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/actions/lint-brightscript.yml + lint-json: + if: contains(github.event.pull_request.labels.*.name, 'dependencies') + uses: ./.github/actions/lint-json.yml + lint-markdown: + if: contains(github.event.pull_request.labels.*.name, 'dependencies') + uses: ./.github/actions/lint-markdown.yml + lint-spelling: + if: contains(github.event.pull_request.labels.*.name, 'dependencies') + uses: ./.github/actions/lint-spelling.yml + lint-translation-files: + if: contains(github.event.pull_request.labels.*.name, 'dependencies') + uses: ./.github/actions/lint-translation-files.yml + build-dev: + if: contains(github.event.pull_request.labels.*.name, 'dependencies') + uses: ./.github/actions/build-dev.yml + build-prod: + if: contains(github.event.pull_request.labels.*.name, 'dependencies') + uses: ./.github/actions/build-prod.yml + roku-analysis: + if: contains(github.event.pull_request.labels.*.name, 'dependencies') + uses: ./.github/actions/roku-analysis.yml + From e667096ead77f6dad6590eb90785c74a7d238fdf Mon Sep 17 00:00:00 2001 From: Charles Ewert Date: Tue, 26 Nov 2024 09:20:51 -0500 Subject: [PATCH 3/5] move everything under the workflows dir --- .github/{ => workflows}/actions/build-dev.yml | 0 .github/{ => workflows}/actions/build-prod.yml | 0 .../actions/lint-brightscript.yml | 0 .github/{ => workflows}/actions/lint-json.yml | 0 .../{ => workflows}/actions/lint-markdown.yml | 0 .../{ => workflows}/actions/lint-spelling.yml | 0 .../actions/lint-translation-files.yml | 0 .../{ => workflows}/actions/roku-analysis.yml | 0 .github/workflows/build-dev.yml | 2 +- .github/workflows/build-prod.yml | 2 +- .github/workflows/lint-brightscript.yml | 2 +- .github/workflows/lint-json.yml | 2 +- .github/workflows/lint-markdown.yml | 2 +- .github/workflows/lint-spelling.yml | 2 +- .github/workflows/lint-translation-files.yml | 2 +- .github/workflows/roku-analysis.yml | 2 +- .github/workflows/validate-dependencies.yml | 16 ++++++++-------- 17 files changed, 16 insertions(+), 16 deletions(-) rename .github/{ => workflows}/actions/build-dev.yml (100%) rename .github/{ => workflows}/actions/build-prod.yml (100%) rename .github/{ => workflows}/actions/lint-brightscript.yml (100%) rename .github/{ => workflows}/actions/lint-json.yml (100%) rename .github/{ => workflows}/actions/lint-markdown.yml (100%) rename .github/{ => workflows}/actions/lint-spelling.yml (100%) rename .github/{ => workflows}/actions/lint-translation-files.yml (100%) rename .github/{ => workflows}/actions/roku-analysis.yml (100%) diff --git a/.github/actions/build-dev.yml b/.github/workflows/actions/build-dev.yml similarity index 100% rename from .github/actions/build-dev.yml rename to .github/workflows/actions/build-dev.yml diff --git a/.github/actions/build-prod.yml b/.github/workflows/actions/build-prod.yml similarity index 100% rename from .github/actions/build-prod.yml rename to .github/workflows/actions/build-prod.yml diff --git a/.github/actions/lint-brightscript.yml b/.github/workflows/actions/lint-brightscript.yml similarity index 100% rename from .github/actions/lint-brightscript.yml rename to .github/workflows/actions/lint-brightscript.yml diff --git a/.github/actions/lint-json.yml b/.github/workflows/actions/lint-json.yml similarity index 100% rename from .github/actions/lint-json.yml rename to .github/workflows/actions/lint-json.yml diff --git a/.github/actions/lint-markdown.yml b/.github/workflows/actions/lint-markdown.yml similarity index 100% rename from .github/actions/lint-markdown.yml rename to .github/workflows/actions/lint-markdown.yml diff --git a/.github/actions/lint-spelling.yml b/.github/workflows/actions/lint-spelling.yml similarity index 100% rename from .github/actions/lint-spelling.yml rename to .github/workflows/actions/lint-spelling.yml diff --git a/.github/actions/lint-translation-files.yml b/.github/workflows/actions/lint-translation-files.yml similarity index 100% rename from .github/actions/lint-translation-files.yml rename to .github/workflows/actions/lint-translation-files.yml diff --git a/.github/actions/roku-analysis.yml b/.github/workflows/actions/roku-analysis.yml similarity index 100% rename from .github/actions/roku-analysis.yml rename to .github/workflows/actions/roku-analysis.yml diff --git a/.github/workflows/build-dev.yml b/.github/workflows/build-dev.yml index ac9b7414f..2b9c18fc2 100644 --- a/.github/workflows/build-dev.yml +++ b/.github/workflows/build-dev.yml @@ -6,4 +6,4 @@ on: jobs: dev: - uses: ./.github/actions/build-dev.yml + uses: ./.github/workflows/actions/build-dev.yml diff --git a/.github/workflows/build-prod.yml b/.github/workflows/build-prod.yml index 4bca6a3f4..181827b23 100644 --- a/.github/workflows/build-prod.yml +++ b/.github/workflows/build-prod.yml @@ -9,4 +9,4 @@ on: jobs: prod: - uses: ./.github/actions/build-prod.yml + uses: ./.github/workflows/actions/build-prod.yml diff --git a/.github/workflows/lint-brightscript.yml b/.github/workflows/lint-brightscript.yml index 5dc3c9b4b..7636a4615 100644 --- a/.github/workflows/lint-brightscript.yml +++ b/.github/workflows/lint-brightscript.yml @@ -7,4 +7,4 @@ on: jobs: run: - uses: ./.github/actions/lint-brightscript.yml + uses: ./.github/workflows/actions/lint-brightscript.yml diff --git a/.github/workflows/lint-json.yml b/.github/workflows/lint-json.yml index 33406f56d..51caed481 100644 --- a/.github/workflows/lint-json.yml +++ b/.github/workflows/lint-json.yml @@ -7,4 +7,4 @@ on: jobs: run: - uses: ./.github/actions/lint-json.yml \ No newline at end of file + uses: ./.github/workflows/actions/lint-json.yml \ No newline at end of file diff --git a/.github/workflows/lint-markdown.yml b/.github/workflows/lint-markdown.yml index 8d0ff00dd..315a75a2f 100644 --- a/.github/workflows/lint-markdown.yml +++ b/.github/workflows/lint-markdown.yml @@ -6,4 +6,4 @@ on: jobs: run: - uses: ./.github/actions/lint-markdown.yml + uses: ./.github/workflows/actions/lint-markdown.yml diff --git a/.github/workflows/lint-spelling.yml b/.github/workflows/lint-spelling.yml index 875d5a52b..12d6b9544 100644 --- a/.github/workflows/lint-spelling.yml +++ b/.github/workflows/lint-spelling.yml @@ -6,4 +6,4 @@ on: jobs: run: - uses: ./.github/actions/lint-spelling.yml + uses: ./.github/workflows/actions/lint-spelling.yml diff --git a/.github/workflows/lint-translation-files.yml b/.github/workflows/lint-translation-files.yml index 965e49a50..2641bf205 100644 --- a/.github/workflows/lint-translation-files.yml +++ b/.github/workflows/lint-translation-files.yml @@ -6,4 +6,4 @@ on: jobs: run: - uses: ./.github/actions/lint-translation-files.yml + uses: ./.github/workflows/actions/lint-translation-files.yml diff --git a/.github/workflows/roku-analysis.yml b/.github/workflows/roku-analysis.yml index efe16486f..87fb685d8 100644 --- a/.github/workflows/roku-analysis.yml +++ b/.github/workflows/roku-analysis.yml @@ -8,4 +8,4 @@ env: jobs: static: - uses: ./.github/actions/roku-analysis.yml + uses: ./.github/workflows/actions/roku-analysis.yml diff --git a/.github/workflows/validate-dependencies.yml b/.github/workflows/validate-dependencies.yml index 5bb6f7797..072a1f503 100644 --- a/.github/workflows/validate-dependencies.yml +++ b/.github/workflows/validate-dependencies.yml @@ -7,26 +7,26 @@ on: jobs: lint-brightscript: if: contains(github.event.pull_request.labels.*.name, 'dependencies') - uses: ./.github/actions/lint-brightscript.yml + uses: ./.github/workflows/actions/lint-brightscript.yml lint-json: if: contains(github.event.pull_request.labels.*.name, 'dependencies') - uses: ./.github/actions/lint-json.yml + uses: ./.github/workflows/actions/lint-json.yml lint-markdown: if: contains(github.event.pull_request.labels.*.name, 'dependencies') - uses: ./.github/actions/lint-markdown.yml + uses: ./.github/workflows/actions/lint-markdown.yml lint-spelling: if: contains(github.event.pull_request.labels.*.name, 'dependencies') - uses: ./.github/actions/lint-spelling.yml + uses: ./.github/workflows/actions/lint-spelling.yml lint-translation-files: if: contains(github.event.pull_request.labels.*.name, 'dependencies') - uses: ./.github/actions/lint-translation-files.yml + uses: ./.github/workflows/actions/lint-translation-files.yml build-dev: if: contains(github.event.pull_request.labels.*.name, 'dependencies') - uses: ./.github/actions/build-dev.yml + uses: ./.github/workflows/actions/build-dev.yml build-prod: if: contains(github.event.pull_request.labels.*.name, 'dependencies') - uses: ./.github/actions/build-prod.yml + uses: ./.github/workflows/actions/build-prod.yml roku-analysis: if: contains(github.event.pull_request.labels.*.name, 'dependencies') - uses: ./.github/actions/roku-analysis.yml + uses: ./.github/workflows/actions/roku-analysis.yml From d95c77169bf4559c9b597badd2d084e4f7a91ea6 Mon Sep 17 00:00:00 2001 From: Charles Ewert Date: Tue, 26 Nov 2024 09:26:10 -0500 Subject: [PATCH 4/5] remove actions folder --- .../{actions/build-dev.yml => _build-dev.yml} | 0 .../{actions/build-prod.yml => _build-prod.yml} | 0 ...t-brightscript.yml => _lint-brightscript.yml} | 0 .../{actions/lint-json.yml => _lint-json.yml} | 0 .../lint-markdown.yml => _lint-markdown.yml} | 0 .../lint-spelling.yml => _lint-spelling.yml} | 0 ...ion-files.yml => _lint-translation-files.yml} | 0 .../roku-analysis.yml => _roku-analysis.yml} | 0 .github/workflows/build-dev.yml | 2 +- .github/workflows/build-prod.yml | 2 +- .github/workflows/lint-brightscript.yml | 2 +- .github/workflows/lint-json.yml | 2 +- .github/workflows/lint-markdown.yml | 2 +- .github/workflows/lint-spelling.yml | 2 +- .github/workflows/lint-translation-files.yml | 2 +- .github/workflows/roku-analysis.yml | 2 +- .github/workflows/validate-dependencies.yml | 16 ++++++++-------- 17 files changed, 16 insertions(+), 16 deletions(-) rename .github/workflows/{actions/build-dev.yml => _build-dev.yml} (100%) rename .github/workflows/{actions/build-prod.yml => _build-prod.yml} (100%) rename .github/workflows/{actions/lint-brightscript.yml => _lint-brightscript.yml} (100%) rename .github/workflows/{actions/lint-json.yml => _lint-json.yml} (100%) rename .github/workflows/{actions/lint-markdown.yml => _lint-markdown.yml} (100%) rename .github/workflows/{actions/lint-spelling.yml => _lint-spelling.yml} (100%) rename .github/workflows/{actions/lint-translation-files.yml => _lint-translation-files.yml} (100%) rename .github/workflows/{actions/roku-analysis.yml => _roku-analysis.yml} (100%) diff --git a/.github/workflows/actions/build-dev.yml b/.github/workflows/_build-dev.yml similarity index 100% rename from .github/workflows/actions/build-dev.yml rename to .github/workflows/_build-dev.yml diff --git a/.github/workflows/actions/build-prod.yml b/.github/workflows/_build-prod.yml similarity index 100% rename from .github/workflows/actions/build-prod.yml rename to .github/workflows/_build-prod.yml diff --git a/.github/workflows/actions/lint-brightscript.yml b/.github/workflows/_lint-brightscript.yml similarity index 100% rename from .github/workflows/actions/lint-brightscript.yml rename to .github/workflows/_lint-brightscript.yml diff --git a/.github/workflows/actions/lint-json.yml b/.github/workflows/_lint-json.yml similarity index 100% rename from .github/workflows/actions/lint-json.yml rename to .github/workflows/_lint-json.yml diff --git a/.github/workflows/actions/lint-markdown.yml b/.github/workflows/_lint-markdown.yml similarity index 100% rename from .github/workflows/actions/lint-markdown.yml rename to .github/workflows/_lint-markdown.yml diff --git a/.github/workflows/actions/lint-spelling.yml b/.github/workflows/_lint-spelling.yml similarity index 100% rename from .github/workflows/actions/lint-spelling.yml rename to .github/workflows/_lint-spelling.yml diff --git a/.github/workflows/actions/lint-translation-files.yml b/.github/workflows/_lint-translation-files.yml similarity index 100% rename from .github/workflows/actions/lint-translation-files.yml rename to .github/workflows/_lint-translation-files.yml diff --git a/.github/workflows/actions/roku-analysis.yml b/.github/workflows/_roku-analysis.yml similarity index 100% rename from .github/workflows/actions/roku-analysis.yml rename to .github/workflows/_roku-analysis.yml diff --git a/.github/workflows/build-dev.yml b/.github/workflows/build-dev.yml index 2b9c18fc2..cb13dd93e 100644 --- a/.github/workflows/build-dev.yml +++ b/.github/workflows/build-dev.yml @@ -6,4 +6,4 @@ on: jobs: dev: - uses: ./.github/workflows/actions/build-dev.yml + uses: ./.github/workflows/_build-dev.yml diff --git a/.github/workflows/build-prod.yml b/.github/workflows/build-prod.yml index 181827b23..11b981caa 100644 --- a/.github/workflows/build-prod.yml +++ b/.github/workflows/build-prod.yml @@ -9,4 +9,4 @@ on: jobs: prod: - uses: ./.github/workflows/actions/build-prod.yml + uses: ./.github/workflows/_build-prod.yml diff --git a/.github/workflows/lint-brightscript.yml b/.github/workflows/lint-brightscript.yml index 7636a4615..d156b6a47 100644 --- a/.github/workflows/lint-brightscript.yml +++ b/.github/workflows/lint-brightscript.yml @@ -7,4 +7,4 @@ on: jobs: run: - uses: ./.github/workflows/actions/lint-brightscript.yml + uses: ./.github/workflows/_lint-brightscript.yml diff --git a/.github/workflows/lint-json.yml b/.github/workflows/lint-json.yml index 51caed481..82fd668f8 100644 --- a/.github/workflows/lint-json.yml +++ b/.github/workflows/lint-json.yml @@ -7,4 +7,4 @@ on: jobs: run: - uses: ./.github/workflows/actions/lint-json.yml \ No newline at end of file + uses: ./.github/workflows/_lint-json.yml \ No newline at end of file diff --git a/.github/workflows/lint-markdown.yml b/.github/workflows/lint-markdown.yml index 315a75a2f..c00cee4e9 100644 --- a/.github/workflows/lint-markdown.yml +++ b/.github/workflows/lint-markdown.yml @@ -6,4 +6,4 @@ on: jobs: run: - uses: ./.github/workflows/actions/lint-markdown.yml + uses: ./.github/workflows/_lint-markdown.yml diff --git a/.github/workflows/lint-spelling.yml b/.github/workflows/lint-spelling.yml index 12d6b9544..9a74fb681 100644 --- a/.github/workflows/lint-spelling.yml +++ b/.github/workflows/lint-spelling.yml @@ -6,4 +6,4 @@ on: jobs: run: - uses: ./.github/workflows/actions/lint-spelling.yml + uses: ./.github/workflows/_lint-spelling.yml diff --git a/.github/workflows/lint-translation-files.yml b/.github/workflows/lint-translation-files.yml index 2641bf205..ab5b55f4c 100644 --- a/.github/workflows/lint-translation-files.yml +++ b/.github/workflows/lint-translation-files.yml @@ -6,4 +6,4 @@ on: jobs: run: - uses: ./.github/workflows/actions/lint-translation-files.yml + uses: ./.github/workflows/_lint-translation-files.yml diff --git a/.github/workflows/roku-analysis.yml b/.github/workflows/roku-analysis.yml index 87fb685d8..c8e86f9c3 100644 --- a/.github/workflows/roku-analysis.yml +++ b/.github/workflows/roku-analysis.yml @@ -8,4 +8,4 @@ env: jobs: static: - uses: ./.github/workflows/actions/roku-analysis.yml + uses: ./.github/workflows/_roku-analysis.yml diff --git a/.github/workflows/validate-dependencies.yml b/.github/workflows/validate-dependencies.yml index 072a1f503..053c98e25 100644 --- a/.github/workflows/validate-dependencies.yml +++ b/.github/workflows/validate-dependencies.yml @@ -7,26 +7,26 @@ on: jobs: lint-brightscript: if: contains(github.event.pull_request.labels.*.name, 'dependencies') - uses: ./.github/workflows/actions/lint-brightscript.yml + uses: ./.github/workflows/_lint-brightscript.yml lint-json: if: contains(github.event.pull_request.labels.*.name, 'dependencies') - uses: ./.github/workflows/actions/lint-json.yml + uses: ./.github/workflows/_lint-json.yml lint-markdown: if: contains(github.event.pull_request.labels.*.name, 'dependencies') - uses: ./.github/workflows/actions/lint-markdown.yml + uses: ./.github/workflows/_lint-markdown.yml lint-spelling: if: contains(github.event.pull_request.labels.*.name, 'dependencies') - uses: ./.github/workflows/actions/lint-spelling.yml + uses: ./.github/workflows/_lint-spelling.yml lint-translation-files: if: contains(github.event.pull_request.labels.*.name, 'dependencies') - uses: ./.github/workflows/actions/lint-translation-files.yml + uses: ./.github/workflows/_lint-translation-files.yml build-dev: if: contains(github.event.pull_request.labels.*.name, 'dependencies') - uses: ./.github/workflows/actions/build-dev.yml + uses: ./.github/workflows/_build-dev.yml build-prod: if: contains(github.event.pull_request.labels.*.name, 'dependencies') - uses: ./.github/workflows/actions/build-prod.yml + uses: ./.github/workflows/_build-prod.yml roku-analysis: if: contains(github.event.pull_request.labels.*.name, 'dependencies') - uses: ./.github/workflows/actions/roku-analysis.yml + uses: ./.github/workflows/_roku-analysis.yml From 8de337e96718a5c0669e988f68563a1030f79fae Mon Sep 17 00:00:00 2001 From: Charles Ewert Date: Tue, 26 Nov 2024 09:43:02 -0500 Subject: [PATCH 5/5] 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 -