Skip to content

Commit 5e44386

Browse files
authored
Merge pull request #30 from ipfs/fix-commit-status
fix: disabling commit status and pr comments
2 parents e54ba1b + 2dacd08 commit 5e44386

File tree

3 files changed

+26
-9
lines changed

3 files changed

+26
-9
lines changed

CHANGELOG.md

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

88
## Unreleased
99

10+
## [1.5.0] - 2025-03-07
11+
12+
### Added
13+
14+
- Add `set-pr-comment` input to control PR comment creation separately from GitHub commit status
15+
16+
### Fixed
17+
18+
- Fix bug where GitHub commit status was still being set when `set-github-status` was set to 'false'
19+
- Update descriptions to clarify that string values 'true' and 'false' are expected for boolean inputs
20+
1021
## [1.4.1] - 2025-03-06
1122

1223
### Fixed

README.md

+6-5
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ The [composite action](https://docs.github.com/en/actions/sharing-automations/cr
1818
- 📍 Optional pinning to Pinata
1919
- 💾 Optional CAR file upload to Filebase
2020
- 📤 CAR file attached to Github Action run Summary page
21-
- 💬 PR comment with CID and preview links
2221
- 🔗 Automatic preview links
23-
- ✅ Commit status updates
22+
- 💬 Optional PR comments with CID and preview links
23+
- ✅ Optional commit status updates with build CID
2424

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

@@ -56,7 +56,7 @@ The signing key and proof will be used as [inputs](#inputs) to the action.
5656
| `cluster-url` | IPFS Cluster URL to pass to `ipfs-cluster-ctl --host` |
5757
| `cluster-user` | IPFS Cluster username for basic http auth |
5858
| `cluster-password` | IPFS Cluster password for basic http auth |
59-
| `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 |
59+
| `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 |
6060
| `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` |
6161

6262
> [!IMPORTANT]
@@ -79,12 +79,13 @@ The signing key and proof will be used as [inputs](#inputs) to the action.
7979
| `filebase-bucket` | Filebase bucket name | - |
8080
| `filebase-access-key` | Filebase access key | - |
8181
| `filebase-secret-key` | Filebase secret key | - |
82-
| `set-github-status` | Set GitHub commit status and PR comments | `'true'` |
82+
| `set-github-status` | Set GitHub commit status with build CID. Use "true" or "false" (as strings) | `'true'` |
83+
| `set-pr-comment` | Set PR comments with IPFS deployment information. Use "true" or "false" (as strings) | `'true'` |
8384
| `upload-car-artifact` | Upload and publish the CAR file on GitHub Action Summary pages | `'true'` |
8485
| `cluster-retry-attempts` | Number of retry attempts for IPFS Cluster uploads | `'5'` |
8586
| `cluster-timeout-minutes` | Timeout in minutes for each IPFS Cluster upload attempt | `'2'` |
8687
| `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. | - |
87-
| `pin-name` | Custom name for the pin. If unset, defaults to "{repo-name}-{commit-sha-short}" for both IPFS Cluster and Pinata. | - |
88+
| `pin-name` | Custom name for the pin. If unset, defaults to "{repo-name}-{commit-sha-short}" for both IPFS Cluster and Pinata. | - |
8889

8990
## Outputs
9091

action.yml

+9-4
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,13 @@ inputs:
7474
description: 'GitHub token for updating commit status and PR comments'
7575
required: true
7676
set-github-status:
77-
description: 'Set GitHub commit status and PR comments'
77+
description: 'Set GitHub commit status with build CID. Use "true" or "false" (as strings)'
7878
default: 'true'
79+
required: false
80+
set-pr-comment:
81+
description: 'Set PR comments with IPFS deployment information. Use "true" or "false" (as strings)'
82+
default: 'true'
83+
required: false
7984
upload-car-artifact:
8085
description: 'Upload the CAR file as a GitHub artifact'
8186
default: 'true'
@@ -305,7 +310,7 @@ runs:
305310
echo "✅ Pinned CID \`${{ steps.merkleize.outputs.cid }}\` to Pinata" >> $GITHUB_STEP_SUMMARY
306311
307312
- name: Set GitHub commit status
308-
if: ${{ inputs.set-github-status }}
313+
if: ${{ inputs.set-github-status == 'true' }}
309314
uses: actions/github-script@v7
310315
with:
311316
github-token: ${{ inputs.github-token }}
@@ -328,7 +333,7 @@ runs:
328333
});
329334
330335
- name: Find Comment to update
331-
if: ${{ inputs.set-github-status && (github.event_name == 'pull_request' || github.event_name == 'pull_request_target') }}
336+
if: ${{ inputs.set-pr-comment == 'true' && (github.event_name == 'pull_request' || github.event_name == 'pull_request_target') }}
332337
uses: peter-evans/find-comment@v3
333338
id: fc
334339
with:
@@ -338,7 +343,7 @@ runs:
338343
token: ${{ inputs.github-token }}
339344

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

0 commit comments

Comments
 (0)