Upload to Filecoin #66
This file contains hidden or 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
| name: Upload to Filecoin | |
| on: | |
| workflow_run: | |
| workflows: ["CI"] # Must match the name in ci.yml | |
| types: | |
| - completed | |
| workflow_dispatch: # Allow manual testing | |
| jobs: | |
| upload: | |
| # Only run if the build workflow succeeded | |
| if: ${{ github.event.workflow_run.conclusion == 'success' }} | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| checks: write | |
| actions: read # Required to download artifacts from workflow_run | |
| pull-requests: write # Required to comment on PRs | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| # Download the build artifacts from the build workflow | |
| - name: Download build artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: site-dist | |
| path: dist | |
| github-token: ${{ github.token }} | |
| repository: ${{ github.event.workflow_run.repository.full_name }} | |
| run-id: ${{ github.event.workflow_run.id }} | |
| # Upload to Filecoin using the downloaded build artifacts | |
| # The action will create a CAR file from the downloaded artifacts and upload to Filecoin | |
| - name: Upload to Filecoin | |
| uses: filecoin-project/filecoin-pin/upload-action@master | |
| with: | |
| path: dist # Path to the downloaded build artifacts | |
| walletPrivateKey: ${{ secrets.WALLET_PRIVATE_KEY }} | |
| network: calibration | |
| minStorageDays: "30" | |
| filecoinPayBalanceLimit: "0.25" |