Skip to content

Commit

Permalink
Fix passing secrets
Browse files Browse the repository at this point in the history
  • Loading branch information
lyarenei committed Sep 1, 2024
1 parent c2317d1 commit b367101
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 21 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/build-upload-publish-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,18 @@ jobs:
uses: ./.github/workflows/upload-repo.yml
with:
repo: "jellyfin-dev"
secrets:
host: ${{ secrets.DEPLOY_HOST }}
username: ${{ secrets.DEPLOY_USER }}
key: ${{ secrets.DEPLOY_KEY }}

publish:
if: ${{ contains(github.repository, 'lyarenei/') }}
needs: upload-repo
uses: ./.github/workflows/publish.yml
with:
repo: "jellyfin-dev"
secrets:
host: ${{ secrets.DEPLOY_HOST }}
username: ${{ secrets.DEPLOY_USER }}
key: ${{ secrets.DEPLOY_KEY }}
8 changes: 8 additions & 0 deletions .github/workflows/build-upload-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,18 @@ jobs:
uses: .github/workflows/upload-repo.yml@main
with:
repo: "jellyfin"
secrets:
host: ${{ secrets.DEPLOY_HOST }}
username: ${{ secrets.DEPLOY_USER }}
key: ${{ secrets.DEPLOY_KEY }}

publish:
if: ${{ contains(github.repository, 'lyarenei/') }}
needs: upload
uses: .github/workflows/publish.yml@main
with:
repo: "jellyfin"
secrets:
host: ${{ secrets.DEPLOY_HOST }}
username: ${{ secrets.DEPLOY_USER }}
key: ${{ secrets.DEPLOY_KEY }}
18 changes: 9 additions & 9 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ on:
type: string
required: true
secrets:
DEPLOY_HOST:
required: false
DEPLOY_USER:
required: false
DEPLOY_KEY:
required: false
host:
required: true
user:
required: true
key:
required: true

jobs:
publish:
Expand All @@ -26,9 +26,9 @@ jobs:
- name: Update Plugin Manifest
uses: appleboy/ssh-action@029f5b4aeeeb58fdfe1410a5d17f967dacf36262 # v1.0.3
with:
host: ${{ secrets.DEPLOY_HOST }}
username: ${{ secrets.DEPLOY_USER }}
key: ${{ secrets.DEPLOY_KEY }}
host: ${{ secrets.host }}
username: ${{ secrets.user }}
key: ${{ secrets.key }}
script_stop: true
envs: MANIFEST_FILE,REPO_PATH,REPO_URL
script: |-
Expand Down
24 changes: 12 additions & 12 deletions .github/workflows/upload-repo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ on:
type: string
required: true
secrets:
DEPLOY_HOST:
required: false
DEPLOY_USER:
required: false
DEPLOY_KEY:
required: false
host:
required: true
user:
required: true
key:
required: true

jobs:
upload-repo:
Expand All @@ -28,9 +28,9 @@ jobs:
uses: appleboy/ssh-action@029f5b4aeeeb58fdfe1410a5d17f967dacf36262 # v1.0.3
if: ${{ contains(github.repository, 'lyarenei/') }}
with:
host: ${{ secrets.DEPLOY_HOST }}
username: ${{ secrets.DEPLOY_USER }}
key: ${{ secrets.DEPLOY_KEY }}
host: ${{ secrets.host }}
username: ${{ secrets.user }}
key: ${{ secrets.key }}
script_stop: true
script: |-
mkdir -p "/var/www/repos/${{ inputs.repo }}/${{ github.repository }}/${{ inputs.version }}" || exit 1
Expand All @@ -42,6 +42,6 @@ jobs:
switches: -vrptz
path: ./*.zip
remote_path: /var/www/repos/${{ inputs.repo }}/${{ github.repository }}/${{ inputs.version }}
remote_host: ${{ secrets.DEPLOY_HOST }}
remote_user: ${{ secrets.DEPLOY_USER }}
remote_key: ${{ secrets.DEPLOY_KEY }}
remote_host: ${{ secrets.host }}
remote_user: ${{ secrets.user }}
remote_key: ${{ secrets.key }}

0 comments on commit b367101

Please sign in to comment.