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

Commit

Permalink
ci: more update-jellyfin-release.yml fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ReenigneArcher committed May 23, 2024
1 parent 9f0eef7 commit bd56ff0
Showing 1 changed file with 19 additions and 7 deletions.
26 changes: 19 additions & 7 deletions .github/workflows/update-jellyfin-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}"
Expand All @@ -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:
Expand All @@ -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: |
Expand Down Expand Up @@ -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' }}
Expand Down

0 comments on commit bd56ff0

Please sign in to comment.