diff --git a/.github/workflows/update-jellyfin-release.yml b/.github/workflows/update-jellyfin-release.yml index 974a68b..4dadeab 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 me concurrency: group: "${{ github.workflow }}-${{ github.event.release.tag_name }}" @@ -23,21 +25,29 @@ jobs: runs-on: ubuntu-latest steps: - name: Check if Jellyfin repo - id: isJellyfinRepo + env: + TOPIC: jellyfin-plugin + id: check uses: actions/github-script@v7 with: script: | - const repoLabels = await github.rest.issues.listLabelsForRepo({ + const topic = process.env.TOPIC; + const repoTopics = await github.rest.repos.getAllTopics({ owner: context.repo.owner, repo: context.repo.repo }); - const isJellyfinRepo = repoLabels.data.some(label => label.name === 'jellyfin-plugin'); - core.setOutput('isJellyfinRepo', isJellyfinRepo); + const hasTopic = repoTopics.data.names.includes(topic); + core.setOutput('hasTopic', hasTopic); + + - name: Debug print + run: | + echo "hasTopic=${{ steps.check.outputs.hasTopic }}" - name: Download release asset id: download if: >- - steps.isJellyfinRepo.outputs.isJellyfinRepo == 'true' && + false && + steps.check.outputs.hasTopic == 'true' && github.event.action != 'deleted' uses: robinraju/release-downloader@v1.10 with: @@ -51,7 +61,8 @@ jobs: - name: Loop through downloaded files if: >- - steps.isJellyfinRepo.outputs.isJellyfinRepo == 'true' && + false && + steps.check.outputs.hasTopic == 'true' && github.event.action != 'deleted' id: loop run: | @@ -82,7 +93,8 @@ jobs: - name: Create/Update Jellyfin Release if: >- - steps.isJellyfinRepo.outputs.isJellyfinRepo == 'true' + false && + steps.check.outputs.hasTopic == 'true' uses: LizardByte/jellyfin-plugin-repo@v2024.522.143446 with: action: ${{ github.event.action == 'deleted' && 'remove' || 'add' }}