Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Liudon committed Sep 26, 2024
1 parent ab18570 commit 6d5bfab
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 5 deletions.
40 changes: 35 additions & 5 deletions .github/workflows/ipfs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,37 @@ name: Publish IPFS
# Controls when the action will run.
on:
workflow_dispatch:
ssh_host:
required: true
type: string
ssh_key:
required: true
type: string
filebase_bucket:
required: true
type: string
filebase_key:
required: true
type: string
filebase_secret:
required: true
type: string
workflow_call:
ssh_host:
required: true
type: string
ssh_key:
required: true
type: string
filebase_bucket:
required: true
type: string
filebase_key:
required: true
type: string
filebase_secret:
required: true
type: string

permissions:
contents: read
Expand Down Expand Up @@ -50,9 +80,9 @@ jobs:
- name: Connect to ssh in BG
timeout-minutes: 2
run: |
echo "${{ secrets.SSHKEY }}" > ../privkey
echo "${{ inputs.ssh_key }}" > ../privkey
chmod 600 ../privkey
ssh -o StrictHostKeyChecking=no ${{ secrets.SSHHOST }} -i ../privkey -L 5001:localhost:5001 -fTN
ssh -o StrictHostKeyChecking=no ${{ inputs.ssh_host }} -i ../privkey -L 5001:localhost:5001 -fTN
- name: IPFS upload
uses: filebase/ipfs-action@master
Expand All @@ -73,7 +103,7 @@ jobs:
path: ./public
service: filebase
pinName: ipfs-action
filebaseBucket: ${{ secrets.FILEBASE_BUCKET }}
filebaseKey: ${{ secrets.FILEBASE_KEY }}
filebaseSecret: ${{ secrets.FILEBASE_SECRET }}
filebaseBucket: ${{ inputs.filebase_bucket }}
filebaseKey: ${{ inputs.filebase_key }}
filebaseSecret: ${{ inputs.filebase_secret }}
key: ipfs-action
6 changes: 6 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,12 @@ jobs:
ipfs:
name: Build and Publish IPFS
uses: ./.github/workflows/ipfs.yml
with:
ssh_host: ${{ secrets.SSHHOST }}
ssh_key: ${{ secrets.SSHKEY }}
filebase_bucket: ${{ secrets.FILEBASE_BUCKET }}
filebase_key: ${{ secrets.FILEBASE_KEY }}
filebase_secret: ${{ secrets.FILEBASE_SECRET }}
needs:
- start

Expand Down

0 comments on commit 6d5bfab

Please sign in to comment.