Skip to content

Commit 64c7681

Browse files
authored
feat: updated to work with standalone (#143)
1 parent e64af9b commit 64c7681

11 files changed

Lines changed: 6111 additions & 106 deletions

File tree

README.md

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,8 @@ steps:
9191
| ipfs | IPFS unique name | - |
9292
| custom-deployment | Custom deployment unique name | - |
9393
| blockscout | Blockscout unique name | - |
94+
| dotEnvFile | .env file content (store in secrets) | - |
95+
| dotEnvLocalFile | .env.local file content (store in secrets) | - |
9496
9597
## Common Use Cases
9698
@@ -205,6 +207,86 @@ steps:
205207
access-token: ${{ secrets.SETTLEMINT_ACCESS_TOKEN }}
206208
```
207209

210+
## Troubleshooting
211+
212+
### Common Issues
213+
214+
#### Invalid Access Token
215+
**Error**: `Failed to authenticate with SettleMint: Error: Process completed with exit code 1. Please check your access token.`
216+
217+
**Solution**:
218+
- Ensure your access token is correctly stored in GitHub Secrets
219+
- Verify the token hasn't expired
220+
- Check that you're using the correct token format:
221+
- Personal Access Tokens: `sm_pat_xxxxx`
222+
- Application Tokens: `sm_app_xxxxx`
223+
224+
#### Command Injection Prevention
225+
**Error**: `Command contains potentially dangerous characters. Please use simple commands only.`
226+
227+
**Solution**:
228+
- Avoid using shell operators like `&&`, `||`, `;`, `|`, or backticks
229+
- Use simple, direct commands
230+
- If you need to run multiple commands, use multiple action steps
231+
232+
#### Version Installation Failures
233+
**Error**: `Invalid version format: x.x.x. Must be a valid semver version or 'latest'`
234+
235+
**Solution**:
236+
- Use valid semantic version numbers (e.g., `1.0.0`, `2.1.3`)
237+
- Use `latest` for the most recent version
238+
- Don't use version ranges or npm tags other than `latest`
239+
240+
#### Environment Variable Issues
241+
**Problem**: Environment variables from `.env` files aren't being loaded
242+
243+
**Solution**:
244+
- Ensure the env file content is stored in GitHub Secrets
245+
- Check that the file content follows the correct format:
246+
```
247+
KEY=value
248+
# Comments are supported
249+
QUOTED_VALUE="value with spaces"
250+
```
251+
- Verify no shell metacharacters are in your values
252+
253+
#### CLI Not Found
254+
**Error**: `settlemint: command not found`
255+
256+
**Solution**:
257+
- The action should automatically install the CLI
258+
- If using a self-hosted runner, ensure npm is available
259+
- Check the action logs for installation errors
260+
261+
### Debugging Tips
262+
263+
1. **Enable Debug Logging**:
264+
```yaml
265+
- name: Run SettleMint CLI
266+
uses: settlemint/settlemint-action@main
267+
env:
268+
ACTIONS_STEP_DEBUG: true
269+
with:
270+
command: "your-command"
271+
access-token: ${{ secrets.SETTLEMINT_ACCESS_TOKEN }}
272+
```
273+
274+
2. **Check Token Format**:
275+
Personal access tokens start with `sm_pat_`, while application tokens start with `sm_app_`. The action behaves differently based on the token type.
276+
277+
3. **Verify Workspace Connection**:
278+
If auto-connect fails, try connecting manually first:
279+
```yaml
280+
- name: Connect to Workspace
281+
uses: settlemint/settlemint-action@main
282+
with:
283+
command: "connect -w your-workspace-id"
284+
access-token: ${{ secrets.SETTLEMINT_ACCESS_TOKEN }}
285+
```
286+
287+
4. **Cache Issues**:
288+
The action caches CLI installations. If you experience issues, the cache will be automatically invalidated when changing versions.
289+
208290
## Contributing
209291

210292
Contributions are welcome! Please read our [Contributing Guide](./.github/CONTRIBUTING.md) for details on our code of conduct and the process for submitting pull requests.
@@ -216,4 +298,5 @@ This project is licensed under the FSL-1.1-MIT License - see the [LICENSE](LICEN
216298
## Support
217299

218300
- 📚 [SettleMint Documentation](https://console.settlemint.com/documentation)
301+
- 💬 [GitHub Issues](https://github.com/settlemint/settlemint-action/issues)
219302
- 📧 [Support Email](mailto:support@settlemint.com)

0 commit comments

Comments
 (0)