File tree Expand file tree Collapse file tree 3 files changed +28
-1
lines changed Expand file tree Collapse file tree 3 files changed +28
-1
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
8
8
## Unreleased
9
9
10
+ ## [ 1.1.2] - 2025-02-26
11
+
12
+ ### Fixed
13
+
14
+ - Improve error handling and logging when the action is not configured correctly, like when the folder to deploy is not found or empty.
15
+
10
16
## [ 1.1.1] - 2025-02-26
11
17
12
18
### Fixed
Original file line number Diff line number Diff line change 98
98
shell : bash
99
99
run : |
100
100
echo "ℹ️ Merkleizing ${{ inputs.path-to-deploy }} into CAR file"
101
- CID=$(npx ipfs-car pack ${{ inputs.path-to-deploy }} --no-wrap --output build.car 2>&1 | tail -n 1)
101
+
102
+ # Verify the directory exists
103
+ if [ ! -d "${{ inputs.path-to-deploy }}" ]; then
104
+ echo "::error::Directory '${{ inputs.path-to-deploy }}' does not exist or is not accessible"
105
+ exit 1
106
+ fi
107
+
108
+ # Verify the directory is not empty
109
+ if [ -z "$(ls -A ${{ inputs.path-to-deploy }})" ]; then
110
+ echo "::error::Directory '${{ inputs.path-to-deploy }}' is empty"
111
+ exit 1
112
+ fi
113
+
114
+ # Merkleize the directory into a CAR file
115
+ CID=$(ipfs-car pack ${{ inputs.path-to-deploy }} --no-wrap --output build.car 2>&1 | tail -n 1)
116
+
117
+ # Verify that we got a valid CID
118
+ if [ -z "$CID" ]; then
119
+ echo "::error::Failed to extract CID from ipfs-car output"
120
+ exit 1
121
+ fi
122
+
102
123
echo "cid=$CID" >> "$GITHUB_OUTPUT"
103
124
echo $CID
104
125
echo "✅ Merkleized path: \`${{ inputs.path-to-deploy }}\` into CAR file with root CID \`$CID\`" >> $GITHUB_STEP_SUMMARY
You can’t perform that action at this time.
0 commit comments