Skip to content

Commit 6d5bfab

Browse files
committed
fix
1 parent ab18570 commit 6d5bfab

File tree

2 files changed

+41
-5
lines changed

2 files changed

+41
-5
lines changed

.github/workflows/ipfs.yml

Lines changed: 35 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,37 @@ name: Publish IPFS
33
# Controls when the action will run.
44
on:
55
workflow_dispatch:
6+
ssh_host:
7+
required: true
8+
type: string
9+
ssh_key:
10+
required: true
11+
type: string
12+
filebase_bucket:
13+
required: true
14+
type: string
15+
filebase_key:
16+
required: true
17+
type: string
18+
filebase_secret:
19+
required: true
20+
type: string
621
workflow_call:
22+
ssh_host:
23+
required: true
24+
type: string
25+
ssh_key:
26+
required: true
27+
type: string
28+
filebase_bucket:
29+
required: true
30+
type: string
31+
filebase_key:
32+
required: true
33+
type: string
34+
filebase_secret:
35+
required: true
36+
type: string
737

838
permissions:
939
contents: read
@@ -50,9 +80,9 @@ jobs:
5080
- name: Connect to ssh in BG
5181
timeout-minutes: 2
5282
run: |
53-
echo "${{ secrets.SSHKEY }}" > ../privkey
83+
echo "${{ inputs.ssh_key }}" > ../privkey
5484
chmod 600 ../privkey
55-
ssh -o StrictHostKeyChecking=no ${{ secrets.SSHHOST }} -i ../privkey -L 5001:localhost:5001 -fTN
85+
ssh -o StrictHostKeyChecking=no ${{ inputs.ssh_host }} -i ../privkey -L 5001:localhost:5001 -fTN
5686
5787
- name: IPFS upload
5888
uses: filebase/ipfs-action@master
@@ -73,7 +103,7 @@ jobs:
73103
path: ./public
74104
service: filebase
75105
pinName: ipfs-action
76-
filebaseBucket: ${{ secrets.FILEBASE_BUCKET }}
77-
filebaseKey: ${{ secrets.FILEBASE_KEY }}
78-
filebaseSecret: ${{ secrets.FILEBASE_SECRET }}
106+
filebaseBucket: ${{ inputs.filebase_bucket }}
107+
filebaseKey: ${{ inputs.filebase_key }}
108+
filebaseSecret: ${{ inputs.filebase_secret }}
79109
key: ipfs-action

.github/workflows/main.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,12 @@ jobs:
5757
ipfs:
5858
name: Build and Publish IPFS
5959
uses: ./.github/workflows/ipfs.yml
60+
with:
61+
ssh_host: ${{ secrets.SSHHOST }}
62+
ssh_key: ${{ secrets.SSHKEY }}
63+
filebase_bucket: ${{ secrets.FILEBASE_BUCKET }}
64+
filebase_key: ${{ secrets.FILEBASE_KEY }}
65+
filebase_secret: ${{ secrets.FILEBASE_SECRET }}
6066
needs:
6167
- start
6268

0 commit comments

Comments
 (0)