Skip to content

Commit

Permalink
foo
Browse files Browse the repository at this point in the history
  • Loading branch information
vesla0x1 committed Apr 4, 2024
1 parent 8bfeea9 commit a3ee5c4
Showing 1 changed file with 12 additions and 23 deletions.
35 changes: 12 additions & 23 deletions .github/workflows/github-actions-demo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,34 +38,23 @@ jobs:
runs-on: ubuntu-latest
environment: production
steps:
- name: Docker pull
run: |
docker pull ipfs/kubo:latest
- name: Start the container
run: |
docker run -d --name ipfs_host -v /tmp/ipfsin/:/export -v /tmp/ipfsout/:/data/ipfs -p 4001:4001 -p 4001:4001/udp -p 127.0.0.1:8080:8080 -p 127.0.0.1:5001:5001 ipfs/kubo:latest
- name: Download build file
uses: actions/download-artifact@v4
with:
name: vesla0x1-portfolio
path: public

- name: Add build files to IPFS
run: |
sudo cp -r public /tmp/ipfsin/public
docker exec ipfs_host ipfs --api /ip4/177.68.188.238/tcp/45005/ add -r export/public
docker exec ipfs_host mv out data/ipfs
- name: Log output
run: |
cat /tmp/ipfsout/out
- name: Install IPFS action
uses: ibnesayeed/setup-ipfs@master
with:
ipfs_version: ^0.4
run_daemon: true

- name: Pin by CID
- name: Test IPFS action
run: |
export CID=$(cat /tmp/ipfsout/out | tail -n 1 | awk '{split($0,s); print s[2]}')
API_URL=https://api.pinata.cloud/pinning/pinByHash
curl -X POST -H "content-type: application/json" \
-H "Authorization: Bearer ${{ secrets.PINATA_API_SECRET }}" \
-d "{\"hashToPin\": \"$CID\"}" $API_URL
ipfs add -r public
- name: Sleep for 30 seconds
uses: jakejarvis/wait-action@master
with:
time: '300s'

0 comments on commit a3ee5c4

Please sign in to comment.