Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## Unreleased

## [1.5.0] - 2025-03-07

### Added

- Add `set-pr-comment` input to control PR comment creation separately from GitHub commit status

### Fixed

- Fix bug where GitHub commit status was still being set when `set-github-status` was set to 'false'
- Update descriptions to clarify that string values 'true' and 'false' are expected for boolean inputs

## [1.4.1] - 2025-03-06

### Fixed
Expand Down
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ The [composite action](https://docs.github.com/en/actions/sharing-automations/cr
- 📍 Optional pinning to Pinata
- 💾 Optional CAR file upload to Filebase
- 📤 CAR file attached to Github Action run Summary page
- 💬 PR comment with CID and preview links
- 🔗 Automatic preview links
- ✅ Commit status updates
- 💬 Optional PR comments with CID and preview links
- ✅ Optional commit status updates with build CID

## How does this compare to the other IPFS actions?

Expand Down Expand Up @@ -56,7 +56,7 @@ The signing key and proof will be used as [inputs](#inputs) to the action.
| `cluster-url` | IPFS Cluster URL to pass to `ipfs-cluster-ctl --host` |
| `cluster-user` | IPFS Cluster username for basic http auth |
| `cluster-password` | IPFS Cluster password for basic http auth |
| `storacha-key` | Storacha base64 encoded key to use to sign UCAN invocations. Create one using `w3 key create --json` (and use `key` from the output). See: https://github.com/storacha/w3cli#w3_principal |
| `storacha-key` | Storacha base64 encoded key to use to sign UCAN invocations. Create one using `w3 key create --json` (and use `key` from the output). See: https://github.com/storacha/w3cli#w3_principal |
| `storacha-proof` | Storacha Base64 encoded proof UCAN with capabilities for the space. Create one using `w3 delegation create did:key:DID_OF_KEY -c space/blob/add -c space/index/add -c filecoin/offer -c upload/add --base64` |

> [!IMPORTANT]
Expand All @@ -79,12 +79,13 @@ The signing key and proof will be used as [inputs](#inputs) to the action.
| `filebase-bucket` | Filebase bucket name | - |
| `filebase-access-key` | Filebase access key | - |
| `filebase-secret-key` | Filebase secret key | - |
| `set-github-status` | Set GitHub commit status and PR comments | `'true'` |
| `set-github-status` | Set GitHub commit status with build CID. Use "true" or "false" (as strings) | `'true'` |
| `set-pr-comment` | Set PR comments with IPFS deployment information. Use "true" or "false" (as strings) | `'true'` |
| `upload-car-artifact` | Upload and publish the CAR file on GitHub Action Summary pages | `'true'` |
| `cluster-retry-attempts` | Number of retry attempts for IPFS Cluster uploads | `'5'` |
| `cluster-timeout-minutes` | Timeout in minutes for each IPFS Cluster upload attempt | `'2'` |
| `cluster-pin-expire-in` | Time duration after which the pin will expire in IPFS Cluster (e.g. 720h for 30 days). If unset, the CID will be pinned with no expiry. | - |
| `pin-name` | Custom name for the pin. If unset, defaults to "{repo-name}-{commit-sha-short}" for both IPFS Cluster and Pinata. | - |
| `pin-name` | Custom name for the pin. If unset, defaults to "{repo-name}-{commit-sha-short}" for both IPFS Cluster and Pinata. | - |

## Outputs

Expand Down
13 changes: 9 additions & 4 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,13 @@ inputs:
description: 'GitHub token for updating commit status and PR comments'
required: true
set-github-status:
description: 'Set GitHub commit status and PR comments'
description: 'Set GitHub commit status with build CID. Use "true" or "false" (as strings)'
default: 'true'
required: false
set-pr-comment:
description: 'Set PR comments with IPFS deployment information. Use "true" or "false" (as strings)'
default: 'true'
required: false
upload-car-artifact:
description: 'Upload the CAR file as a GitHub artifact'
default: 'true'
Expand Down Expand Up @@ -305,7 +310,7 @@ runs:
echo "✅ Pinned CID \`${{ steps.merkleize.outputs.cid }}\` to Pinata" >> $GITHUB_STEP_SUMMARY

- name: Set GitHub commit status
if: ${{ inputs.set-github-status }}
if: ${{ inputs.set-github-status == 'true' }}
uses: actions/github-script@v7
with:
github-token: ${{ inputs.github-token }}
Expand All @@ -328,7 +333,7 @@ runs:
});

- name: Find Comment to update
if: ${{ inputs.set-github-status && (github.event_name == 'pull_request' || github.event_name == 'pull_request_target') }}
if: ${{ inputs.set-pr-comment == 'true' && (github.event_name == 'pull_request' || github.event_name == 'pull_request_target') }}
uses: peter-evans/find-comment@v3
id: fc
with:
Expand All @@ -338,7 +343,7 @@ runs:
token: ${{ inputs.github-token }}

- name: Create or update comment
if: ${{ inputs.set-github-status && (github.event_name == 'pull_request' || github.event_name == 'pull_request_target') }}
if: ${{ inputs.set-pr-comment == 'true' && (github.event_name == 'pull_request' || github.event_name == 'pull_request_target') }}
uses: peter-evans/create-or-update-comment@v4
with:
token: ${{ inputs.github-token }}
Expand Down