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

Commit bd56ff0

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

File tree

1 file changed

+19
-7
lines changed

1 file changed

+19
-7
lines changed

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

+19-7
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ name: Update Jellyfin release
1010
on:
1111
release:
1212
types: [created, edited, deleted]
13+
pull_request:
14+
types: [opened, synchronize] # todo: remove me
1315

1416
concurrency:
1517
group: "${{ github.workflow }}-${{ github.event.release.tag_name }}"
@@ -23,21 +25,29 @@ jobs:
2325
runs-on: ubuntu-latest
2426
steps:
2527
- name: Check if Jellyfin repo
26-
id: isJellyfinRepo
28+
env:
29+
TOPIC: jellyfin-plugin
30+
id: check
2731
uses: actions/github-script@v7
2832
with:
2933
script: |
30-
const repoLabels = await github.rest.issues.listLabelsForRepo({
34+
const topic = process.env.TOPIC;
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+
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 }}"
3645
3746
- name: Download release asset
3847
id: download
3948
if: >-
40-
steps.isJellyfinRepo.outputs.isJellyfinRepo == 'true' &&
49+
false &&
50+
steps.check.outputs.hasTopic == 'true' &&
4151
github.event.action != 'deleted'
4252
uses: robinraju/[email protected]
4353
with:
@@ -51,7 +61,8 @@ jobs:
5161

5262
- name: Loop through downloaded files
5363
if: >-
54-
steps.isJellyfinRepo.outputs.isJellyfinRepo == 'true' &&
64+
false &&
65+
steps.check.outputs.hasTopic == 'true' &&
5566
github.event.action != 'deleted'
5667
id: loop
5768
run: |
@@ -82,7 +93,8 @@ jobs:
8293
8394
- name: Create/Update Jellyfin Release
8495
if: >-
85-
steps.isJellyfinRepo.outputs.isJellyfinRepo == 'true'
96+
false &&
97+
steps.check.outputs.hasTopic == 'true'
8698
uses: LizardByte/[email protected]
8799
with:
88100
action: ${{ github.event.action == 'deleted' && 'remove' || 'add' }}

0 commit comments

Comments
 (0)