File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree 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
77
88## Unreleased
99
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+
1016## [ 1.1.1] - 2025-02-26
1117
1218### Fixed
Original file line number Diff line number Diff line change 9898 shell : bash
9999 run : |
100100 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+
102123 echo "cid=$CID" >> "$GITHUB_OUTPUT"
103124 echo $CID
104125 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