From 2e2a9aea0c1ba826f25a08da1bc75c5934c6a1ab Mon Sep 17 00:00:00 2001 From: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com> Date: Thu, 23 May 2024 12:02:05 -0400 Subject: [PATCH] ci: fix octokit in update-jellyfin-release.yml --- .github/workflows/update-jellyfin-release.yml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/update-jellyfin-release.yml b/.github/workflows/update-jellyfin-release.yml index d9a477d..e31b8bd 100644 --- a/.github/workflows/update-jellyfin-release.yml +++ b/.github/workflows/update-jellyfin-release.yml @@ -10,6 +10,8 @@ name: Update Jellyfin release on: release: types: [created, edited, deleted] + pull_request: + types: [opened, synchronize] # todo: remove this after testing concurrency: group: "${{ github.workflow }}-${{ github.event.release.tag_name }}" @@ -26,12 +28,10 @@ jobs: id: isJellyfinRepo uses: actions/github-script@v7 with: - github-token: ${{ secrets.GH_BOT_TOKEN }} script: | - const repo = context.payload.repository; - const repoLabels = await github.repos.listLabelsForRepo({ - owner: repo.owner.login, - repo: repo.name + const repoLabels = await github.rest.issues.listLabelsForRepo({ + owner: context.repo.owner, + repo: context.repo.repo }); const isJellyfinRepo = repoLabels.data.some(label => label.name === 'jellyfin-plugin'); core.setOutput('isJellyfinRepo', isJellyfinRepo); @@ -39,6 +39,7 @@ jobs: - name: Download release asset id: download if: >- + false && steps.isJellyfinRepo.outputs.isJellyfinRepo == 'true' && github.event.action != 'deleted' uses: robinraju/release-downloader@v1.10 @@ -53,6 +54,7 @@ jobs: - name: Loop through downloaded files if: >- + false && steps.isJellyfinRepo.outputs.isJellyfinRepo == 'true' && github.event.action != 'deleted' id: loop @@ -84,6 +86,7 @@ jobs: - name: Create/Update Jellyfin Release if: >- + false && steps.isJellyfinRepo.outputs.isJellyfinRepo == 'true' uses: LizardByte/jellyfin-plugin-repo@v2024.522.143446 with: