@@ -23,21 +23,30 @@ jobs:
23
23
runs-on : ubuntu-latest
24
24
steps :
25
25
- name : Check if Jellyfin repo
26
- id : isJellyfinRepo
26
+ env :
27
+ TOPIC : jellyfin-plugin
28
+ id : check
27
29
uses : actions/github-script@v7
28
30
with :
29
31
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({
31
36
owner: context.repo.owner,
32
37
repo: context.repo.repo
33
38
});
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);
36
45
37
46
- name : Download release asset
38
47
id : download
39
48
if : >-
40
- steps.isJellyfinRepo .outputs.isJellyfinRepo == 'true' &&
49
+ steps.check .outputs.hasTopic == 'true' &&
41
50
github.event.action != 'deleted'
42
51
43
52
with :
51
60
52
61
- name : Loop through downloaded files
53
62
if : >-
54
- steps.isJellyfinRepo .outputs.isJellyfinRepo == 'true' &&
63
+ steps.check .outputs.hasTopic == 'true' &&
55
64
github.event.action != 'deleted'
56
65
id : loop
57
66
run : |
82
91
83
92
- name : Create/Update Jellyfin Release
84
93
if : >-
85
- steps.isJellyfinRepo .outputs.isJellyfinRepo == 'true'
94
+ steps.check .outputs.hasTopic == 'true'
86
95
uses :
LizardByte/[email protected]
87
96
with :
88
97
action : ${{ github.event.action == 'deleted' && 'remove' || 'add' }}
0 commit comments