From 393ef10229f18d734a4a97b1691714e6d16cee65 Mon Sep 17 00:00:00 2001 From: Charles Ewert Date: Thu, 28 Nov 2024 07:16:45 -0500 Subject: [PATCH] make sure all jobs run for a dependency PR and clean things up --- .github/workflows/_build-dev.yml | 27 -------------------- .github/workflows/_build-prod.yml | 2 +- .github/workflows/_roku-analysis.yml | 2 +- .github/workflows/_validate-dependencies.yml | 2 -- .github/workflows/build-dev.yml | 21 ++++++++++++++- .github/workflows/roku-analysis.yml | 3 --- 6 files changed, 22 insertions(+), 35 deletions(-) delete mode 100644 .github/workflows/_build-dev.yml diff --git a/.github/workflows/_build-dev.yml b/.github/workflows/_build-dev.yml deleted file mode 100644 index 449f7906d..000000000 --- a/.github/workflows/_build-dev.yml +++ /dev/null @@ -1,27 +0,0 @@ -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/workflows/_build-prod.yml b/.github/workflows/_build-prod.yml index 0e2f41146..637d658a4 100644 --- a/.github/workflows/_build-prod.yml +++ b/.github/workflows/_build-prod.yml @@ -6,7 +6,7 @@ on: jobs: prod: - if: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'release-prep') }} + if: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'dependencies') runs-on: ubuntu-latest steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 diff --git a/.github/workflows/_roku-analysis.yml b/.github/workflows/_roku-analysis.yml index d0826a334..067e1a8d3 100644 --- a/.github/workflows/_roku-analysis.yml +++ b/.github/workflows/_roku-analysis.yml @@ -9,7 +9,7 @@ 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 + 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 || contains(github.event.pull_request.labels.*.name, 'dependencies') runs-on: ubuntu-latest steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 diff --git a/.github/workflows/_validate-dependencies.yml b/.github/workflows/_validate-dependencies.yml index 13408d513..863639621 100644 --- a/.github/workflows/_validate-dependencies.yml +++ b/.github/workflows/_validate-dependencies.yml @@ -14,8 +14,6 @@ jobs: 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: diff --git a/.github/workflows/build-dev.yml b/.github/workflows/build-dev.yml index cb13dd93e..70cb8b70d 100644 --- a/.github/workflows/build-dev.yml +++ b/.github/workflows/build-dev.yml @@ -6,4 +6,23 @@ on: jobs: dev: - uses: ./.github/workflows/_build-dev.yml + # 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/workflows/roku-analysis.yml b/.github/workflows/roku-analysis.yml index c8e86f9c3..a3d397b9f 100644 --- a/.github/workflows/roku-analysis.yml +++ b/.github/workflows/roku-analysis.yml @@ -3,9 +3,6 @@ name: roku-analysis on: pull_request: -env: - BRANCH_NAME: ${{ github.head_ref || github.ref_name }} - jobs: static: uses: ./.github/workflows/_roku-analysis.yml