Skip to content

Commit d16b43f

Browse files
committed
feat: add cluster pin expiry
1 parent b566e15 commit d16b43f

File tree

3 files changed

+14
-0
lines changed

3 files changed

+14
-0
lines changed

CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## Unreleased
99

10+
## [1.3.0] - 2025-03-04
11+
12+
### Added
13+
14+
- Add support for time-bound pins in IPFS Cluster via the `cluster-pin-expire-in` input parameter.
15+
1016
## [1.2.1] - 2025-03-03
1117

1218
### Fixed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ The signing key and proof will be used as [inputs](#inputs) to the action.
8282
| `upload-car-artifact` | Upload and publish the CAR file on GitHub Action Summary pages | `'true'` |
8383
| `cluster-retry-attempts` | Number of retry attempts for IPFS Cluster uploads | `'5'` |
8484
| `cluster-timeout-minutes` | Timeout in minutes for each IPFS Cluster upload attempt | `'2'` |
85+
| `cluster-pin-expire-in` | Time duration after which the pin will expire in IPFS Cluster (e.g. 720h for 30 days) | - |
8586

8687
## Outputs
8788

action.yml

+7
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ inputs:
3939
description: 'IPFS Cluster CLI version to use'
4040
default: 'v1.1.2'
4141
required: false
42+
cluster-pin-expire-in:
43+
description: 'Time duration after which the pin will expire in IPFS Cluster (e.g. 720h for 30 days). Only supported by IPFS Cluster.'
44+
required: false
4245
storacha-key:
4346
description: 'Storacha base64 encoded key to use to sign UCAN invocations. Create one using `w3 key create --json`. See: https://github.com/storacha/w3cli#w3_principal'
4447
required: false
@@ -234,8 +237,12 @@ runs:
234237
add --format=car \
235238
--local \
236239
--name "${{ github.repository }}/${{ github.sha }}" \
240+
${{ inputs.cluster-pin-expire-in != '' && format('--expire-in {0}', inputs.cluster-pin-expire-in) || '' }} \
237241
build.car && {
238242
echo "✅ Uploaded CAR with CID ${{ steps.merkleize.outputs.cid }} to IPFS Cluster" >> $GITHUB_STEP_SUMMARY
243+
if [[ -n "${{ inputs.cluster-pin-expire-in }}" ]]; then
244+
echo "⏰ IPFS Cluster Pin is set to expire in ${{ inputs.cluster-pin-expire-in }}" >> $GITHUB_STEP_SUMMARY
245+
fi
239246
exit 0
240247
}
241248

0 commit comments

Comments
 (0)