Skip to content
This repository was archived by the owner on Oct 13, 2024. It is now read-only.

Commit 4ce4750

Browse files
ci: more update-jellyfin-release.yml fixes
1 parent 9f0eef7 commit 4ce4750

File tree

1 file changed

+16
-7
lines changed

1 file changed

+16
-7
lines changed

.github/workflows/update-jellyfin-release.yml

+16-7
Original file line numberDiff line numberDiff line change
@@ -23,21 +23,30 @@ jobs:
2323
runs-on: ubuntu-latest
2424
steps:
2525
- name: Check if Jellyfin repo
26-
id: isJellyfinRepo
26+
env:
27+
TOPIC: jellyfin-plugin
28+
id: check
2729
uses: actions/github-script@v7
2830
with:
2931
script: |
30-
const repoLabels = await github.rest.issues.listLabelsForRepo({
32+
const topic = process.env.TOPIC;
33+
console.log(`Checking if repo has topic: ${topic}`);
34+
35+
const repoTopics = await github.rest.repos.getAllTopics({
3136
owner: context.repo.owner,
3237
repo: context.repo.repo
3338
});
34-
const isJellyfinRepo = repoLabels.data.some(label => label.name === 'jellyfin-plugin');
35-
core.setOutput('isJellyfinRepo', isJellyfinRepo);
39+
console.log(`Repo topics: ${repoTopics.data.names}`);
40+
41+
const hasTopic = repoTopics.data.names.includes(topic);
42+
console.log(`Has topic: ${hasTopic}`);
43+
44+
core.setOutput('hasTopic', hasTopic);
3645
3746
- name: Download release asset
3847
id: download
3948
if: >-
40-
steps.isJellyfinRepo.outputs.isJellyfinRepo == 'true' &&
49+
steps.check.outputs.hasTopic == 'true' &&
4150
github.event.action != 'deleted'
4251
uses: robinraju/[email protected]
4352
with:
@@ -51,7 +60,7 @@ jobs:
5160

5261
- name: Loop through downloaded files
5362
if: >-
54-
steps.isJellyfinRepo.outputs.isJellyfinRepo == 'true' &&
63+
steps.check.outputs.hasTopic == 'true' &&
5564
github.event.action != 'deleted'
5665
id: loop
5766
run: |
@@ -82,7 +91,7 @@ jobs:
8291
8392
- name: Create/Update Jellyfin Release
8493
if: >-
85-
steps.isJellyfinRepo.outputs.isJellyfinRepo == 'true'
94+
steps.check.outputs.hasTopic == 'true'
8695
uses: LizardByte/[email protected]
8796
with:
8897
action: ${{ github.event.action == 'deleted' && 'remove' || 'add' }}

0 commit comments

Comments
 (0)