Skip to content

Commit

Permalink
fix(scaleway): skip if already pinned
Browse files Browse the repository at this point in the history
  • Loading branch information
lidel committed Mar 12, 2024
1 parent 3c68ca3 commit 8c43f5c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -336,9 +336,11 @@ jobs:
run: |
ipfs dag import --offline dist_${{ github.sha }}.car
ipfs pin remote service add scaleway "$SCALEWAY_URL" "$SCALEWAY_SECRET"
ipfs pin remote rm --service=scaleway --force --cid=${{ needs.publish-to-ipfs.outputs.cid }}
ipfs pin remote add --service=scaleway --name=inbrowser-sw-gw-${{ github.sha }} ${{ needs.publish-to-ipfs.outputs.cid }}
already_pinned=$(ipfs pin remote ls --service=scaleway --cid=$CID)
[ -n "already_pinned" ] && exit 0
ipfs pin remote add --service=scaleway --name="${{ github.repository }}/${{ github.sha }}" $CID
env:
CID: ${{ needs.publish-to-ipfs.outputs.cid }}
SCALEWAY_SECRET: ${{ secrets.SCALEWAY_SECRET }}
SCALEWAY_URL: ${{ secrets.SCALEWAY_URL }}

Expand Down

0 comments on commit 8c43f5c

Please sign in to comment.