diff --git a/.github/workflows/ipfs.yml b/.github/workflows/ipfs.yml index a9f6b0fe7..ef10a9f3f 100644 --- a/.github/workflows/ipfs.yml +++ b/.github/workflows/ipfs.yml @@ -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 @@ -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 @@ -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 \ No newline at end of file diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d07a24965..19932c56a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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