Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

simplify ipfs process #2241

Merged
merged 3 commits into from
Nov 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
95 changes: 0 additions & 95 deletions .github/actions/dev-ipfs-pin/action.yml

This file was deleted.

51 changes: 51 additions & 0 deletions .github/actions/ipfs-pin/action.yml
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"
100 changes: 0 additions & 100 deletions .github/actions/production-ipfs-pin/action.yml

This file was deleted.

5 changes: 1 addition & 4 deletions .github/workflows/build-test-deploy-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,11 +127,8 @@ jobs:

- name: Pin to primary IPFS server
id: ipfs-primary
uses: ./.github/actions/dev-ipfs-pin
uses: ./.github/actions/ipfs-pin
with:
GCP_SA_KEY: '${{ secrets.GCP_SA_KEY }}'
GKE_CLUSTER: '${{ secrets.GKE_CLUSTER }}'
GKE_CLUSTER_REGION: '${{ secrets.GKE_CLUSTER_REGION }}'
IPFS_SERVER_PORT: '${{ secrets.IPFS_PRIMARY_SERVER_PORT }}'
IPFS_SERVER: '${{ secrets.IPFS_PRIMARY_SERVER }}'
IPFS_SERVER_KEY: '${{ secrets.IPFS_PRIMARY_SERVER_KEY }}'
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/test-deploy-fork.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,11 +138,8 @@ jobs:

- name: Pin to primary IPFS server
id: ipfs-primary
uses: ./.github/actions/dev-ipfs-pin
uses: ./.github/actions/ipfs-pin
with:
GCP_SA_KEY: '${{ secrets.GCP_SA_KEY }}'
GKE_CLUSTER: '${{ secrets.GKE_CLUSTER }}'
GKE_CLUSTER_REGION: '${{ secrets.GKE_CLUSTER_REGION }}'
IPFS_SERVER_PORT: '${{ secrets.IPFS_PRIMARY_SERVER_PORT }}'
IPFS_SERVER: '${{ secrets.IPFS_PRIMARY_SERVER }}'
IPFS_SERVER_KEY: '${{ secrets.IPFS_PRIMARY_SERVER_KEY }}'
Expand Down
Loading
Loading