@@ -10,6 +10,8 @@ name: Update Jellyfin release
10
10
on :
11
11
release :
12
12
types : [created, edited, deleted]
13
+ pull_request :
14
+ types : [opened, synchronize] # todo: remove me
13
15
14
16
concurrency :
15
17
group : " ${{ github.workflow }}-${{ github.event.release.tag_name }}"
@@ -23,21 +25,29 @@ jobs:
23
25
runs-on : ubuntu-latest
24
26
steps :
25
27
- name : Check if Jellyfin repo
26
- id : isJellyfinRepo
28
+ env :
29
+ TOPIC : jellyfin-plugin
30
+ id : check
27
31
uses : actions/github-script@v7
28
32
with :
29
33
script : |
30
- const repoLabels = await github.rest.issues.listLabelsForRepo({
34
+ const topic = process.env.TOPIC;
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
+ const hasTopic = repoTopics.data.names.includes(topic);
40
+ core.setOutput('hasTopic', hasTopic);
41
+
42
+ - name : Debug print
43
+ run : |
44
+ echo "hasTopic=${{ steps.check.outputs.hasTopic }}"
36
45
37
46
- name : Download release asset
38
47
id : download
39
48
if : >-
40
- steps.isJellyfinRepo.outputs.isJellyfinRepo == 'true' &&
49
+ false &&
50
+ steps.check.outputs.hasTopic == 'true' &&
41
51
github.event.action != 'deleted'
42
52
43
53
with :
51
61
52
62
- name : Loop through downloaded files
53
63
if : >-
54
- steps.isJellyfinRepo.outputs.isJellyfinRepo == 'true' &&
64
+ false &&
65
+ steps.check.outputs.hasTopic == 'true' &&
55
66
github.event.action != 'deleted'
56
67
id : loop
57
68
run : |
82
93
83
94
- name : Create/Update Jellyfin Release
84
95
if : >-
85
- steps.isJellyfinRepo.outputs.isJellyfinRepo == 'true'
96
+ false &&
97
+ steps.check.outputs.hasTopic == 'true'
86
98
uses :
LizardByte/[email protected]
87
99
with :
88
100
action : ${{ github.event.action == 'deleted' && 'remove' || 'add' }}
0 commit comments