Skip to content

Commit a23093b

Browse files
authored
docs: action example selects a random known good SP (#125)
1 parent e1cf5ec commit a23093b

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

upload-action/examples/single-workflow/upload.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,18 @@ jobs:
2929
mkdir -p dist
3030
echo "Built content" > dist/index.html
3131
32+
# Temporary allowlist of storage providers that have proven reliable during launch.
33+
# This exists to paper over early stability issues while the wider provider ecosystem
34+
# catches up. Remove once automatic provider discovery is trustworthy again.
35+
# Having a FilOz-approved set of SPs onchain is happening in https://github.com/FilOzone/filecoin-services/issues/291
36+
# This PROVIDER_ID set here will be used by the upload action below to override provider selection.
37+
- name: Select random known good provider
38+
run: |
39+
known_good_provider_ids=(2 8 16)
40+
selected_provider_id=${known_good_provider_ids[$RANDOM % ${#known_good_provider_ids[@]}]}
41+
echo "PROVIDER_ID=$selected_provider_id" >> $GITHUB_ENV
42+
echo "Selected known good provider ID: $selected_provider_id"
43+
3244
# Upload to Filecoin - the action will build CAR and upload in a single flow
3345
- name: Upload to Filecoin
3446
uses: filecoin-project/filecoin-pin/upload-action@49-feat-github-action-for-filecoin-pin-uploads

upload-action/examples/two-workflow-pattern/upload-to-filecoin.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,18 @@ jobs:
3434
repository: ${{ github.event.workflow_run.repository.full_name }}
3535
run-id: ${{ github.event.workflow_run.id }}
3636

37+
# Temporary allowlist of storage providers that have proven reliable during launch.
38+
# This exists to paper over early stability issues while the wider provider ecosystem
39+
# catches up. Remove once automatic provider discovery is trustworthy again.
40+
# Having a FilOz-approved set of SPs onchain is happening in https://github.com/FilOzone/filecoin-services/issues/291
41+
# This PROVIDER_ID set here will be used by the upload action below to override provider selection.
42+
- name: Select random known good provider
43+
run: |
44+
known_good_provider_ids=(2 8 16)
45+
selected_provider_id=${known_good_provider_ids[$RANDOM % ${#known_good_provider_ids[@]}]}
46+
echo "PROVIDER_ID=$selected_provider_id" >> $GITHUB_ENV
47+
echo "Selected known good provider ID: $selected_provider_id"
48+
3749
# Upload to Filecoin using the downloaded build artifacts
3850
# The action will create a CAR file from the downloaded artifacts and upload to Filecoin
3951
- name: Upload to Filecoin

0 commit comments

Comments
 (0)