-
Notifications
You must be signed in to change notification settings - Fork 359
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
96 additions
and
263 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: Pin to ipfs cluster and nodes | ||
description: Upload build to ipfs node | ||
inputs: | ||
BUILD_PATH: | ||
description: path to the build directory | ||
required: true | ||
PINATA_HASH: | ||
description: '' | ||
required: true | ||
IPFS_SERVER_PORT: | ||
description: '' | ||
required: true | ||
IPFS_SERVER: | ||
description: '' | ||
required: true | ||
IPFS_SERVER_KEY: | ||
description: '' | ||
required: true | ||
|
||
runs: | ||
using: 'composite' | ||
steps: | ||
- name: Prepare env and Compress build on IPFS servers | ||
id: ipfs-prepare | ||
continue-on-error: false | ||
shell: bash | ||
run: | | ||
tar -czf app.tar.gz './${{ inputs.BUILD_PATH }}' | ||
rm -rf ./key | ||
echo -n "${{ inputs.IPFS_SERVER_KEY }}" | base64 -d >> ./key && chmod 400 ./key | ||
- name: Upload build to IPFS Primary Server | ||
id: ipfs-scp-primary | ||
continue-on-error: false | ||
shell: bash | ||
run: | | ||
scp -o StrictHostKeyChecking=no \ | ||
-i ./key \ | ||
-P \${{ inputs.IPFS_SERVER_PORT }} app.tar.gz ipfs@\${{ inputs.IPFS_SERVER }}:. | ||
ssh -o StrictHostKeyChecking=no \ | ||
-p \${{ inputs.IPFS_SERVER_PORT }} \ | ||
-i ./key ipfs@\${{ inputs.IPFS_SERVER }} "tar zxf app.tar.gz && ipfs add -rQ --cid-version=1 ./${{ inputs.BUILD_PATH }}/" | ||
- name: Clean build and tmp directory on Servers | ||
continue-on-error: false | ||
id: ipfs-clean | ||
shell: bash | ||
run: | | ||
ssh -o StrictHostKeyChecking=no \ | ||
-p \${{ inputs.IPFS_SERVER_PORT }} \ | ||
-i ./key ipfs@\${{ inputs.IPFS_SERVER }} "rm -rf ./${{ inputs.BUILD_PATH }}/ app.tar.gz" |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
93c31c4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This commit was deployed on ipfs
93c31c4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This commit was deployed on ipfs