{"id":23372941,"url":"https://github.com/settlemint/settlemint-action","last_synced_at":"2025-07-06T12:37:21.829Z","repository":{"id":268087017,"uuid":"903275789","full_name":"settlemint/settlemint-action","owner":"settlemint","description":"Interact with the SettleMint platform in Github Actions","archived":false,"fork":false,"pushed_at":"2025-07-02T16:08:26.000Z","size":3467,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-07-02T16:42:57.797Z","etag":null,"topics":["blockchain","blockchain-transformation","settlemint"],"latest_commit_sha":null,"homepage":"https://settlemint.com","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/settlemint.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":".github/SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-12-14T07:06:27.000Z","updated_at":"2025-07-02T16:08:29.000Z","dependencies_parsed_at":"2024-12-28T20:19:02.521Z","dependency_job_id":"d927cc1d-0717-4009-9f37-ee6dcf92b6a3","html_url":"https://github.com/settlemint/settlemint-action","commit_stats":null,"previous_names":["settlemint/settlemint-action"],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/settlemint/settlemint-action","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/settlemint%2Fsettlemint-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/settlemint%2Fsettlemint-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/settlemint%2Fsettlemint-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/settlemint%2Fsettlemint-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/settlemint","download_url":"https://codeload.github.com/settlemint/settlemint-action/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/settlemint%2Fsettlemint-action/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263901592,"owners_count":23527438,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["blockchain","blockchain-transformation","settlemint"],"created_at":"2024-12-21T16:51:37.121Z","updated_at":"2025-07-06T12:37:21.823Z","avatar_url":"https://github.com/settlemint.png","language":"TypeScript","readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/settlemint/sdk/blob/main/logo.svg\" width=\"200px\" align=\"center\" alt=\"SettleMint logo\" /\u003e\n  \u003ch1 align=\"center\"\u003eSettleMint Github Action\u003c/h1\u003e\n  \u003cp align=\"center\"\u003e\n    ✨ \u003ca href=\"https://settlemint.com\"\u003ehttps://settlemint.com\u003c/a\u003e ✨\n    \u003cbr/\u003e\n    Integrate SettleMint into your application with ease.\n  \u003c/p\u003e\n\u003c/p\u003e\n\u003cbr/\u003e\n\u003cp align=\"center\"\u003e\n\u003ca href=\"https://github.com/settlemint/settlemint-action/actions?query=branch%3Amain\"\u003e\u003cimg src=\"https://github.com/settlemint/settlemint-action/actions/workflows/ci.yml/badge.svg?event=push\u0026branch=main\" alt=\"CI status\" /\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/settlemint/settlemint-action\" rel=\"nofollow\"\u003e\u003cimg src=\"https://img.shields.io/github/stars/settlemint/settlemint-action\" alt=\"stars\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"https://console.settlemint.com/documentation/\"\u003eDocumentation\u003c/a\u003e\n  \u003cspan\u003e\u0026nbsp;\u0026nbsp;•\u0026nbsp;\u0026nbsp;\u003c/span\u003e\n  \u003ca href=\"https://github.com/settlemint/settlemint-action/issues\"\u003eIssues\u003c/a\u003e\n  \u003cbr /\u003e\n\u003c/div\u003e\n\n## Description\n\nThis GitHub Action allows you to execute SettleMint CLI commands in your GitHub Actions workflow. It handles installation, authentication, and execution of CLI commands with proper environment configuration.\n\n## Features\n\n- 🚀 Automatic installation of SettleMint CLI\n- 🔐 Built-in authentication handling\n- 🌍 Support for all SettleMint environment variables\n- 📦 Version control for CLI installation\n- 🔌 Automatic workspace connection\n\n## Usage\n\n### Basic Example\n\n```yaml\nsteps:\n  - uses: actions/checkout@v4\n  - name: Run SettleMint CLI\n    uses: settlemint/settlemint-action@main\n    with:\n      command: \"platform list workspaces\"\n      access-token: ${{ secrets.SETTLEMINT_ACCESS_TOKEN }}\n```\n\n### Advanced Example\n\n```yaml\nsteps:\n  - uses: actions/checkout@v4\n  - name: Deploy Smart Contract\n    uses: settlemint/settlemint-action@main\n    with:\n      command: \"scs hardhat deploy remote --accept-defaults\"\n      access-token: ${{ secrets.SETTLEMINT_ACCESS_TOKEN }}\n      version: \"1.0.0\"\n      workspace: \"my-workspace-ae70\"\n      blockchain-node: \"my-node-3b8e\"\n      auto-connect: \"true\"\n```\n\n## Inputs\n\n### Required\n\n| Input        | Description                                                                | Required |\n| ------------ | -------------------------------------------------------------------------- | -------- |\n| access-token | SettleMint Access Token (can be a personal or an application access token) | Yes      |\n\n### Optional\n\n| Input              | Description                                | Default                                                           |\n| ------------------ | ------------------------------------------ | ----------------------------------------------------------------- |\n| command            | CLI command to execute                     | -                                                                 |\n| version            | CLI version to install                     | 'latest'                                                          |\n| auto-connect       | Automatically connect to workspace         | 'true' (personal access token) 'false' (application access token) |\n| instance           | SettleMint instance URL                    | 'https://console.settlemint.com'                                  |\n| workspace          | Workspace unique name                      | -                                                                 |\n| application        | Application unique name                    | -                                                                 |\n| blockchain-network | Blockchain network unique name             | -                                                                 |\n| blockchain-node    | Blockchain node unique name                | -                                                                 |\n| load-balancer      | Load balancer unique name                  | -                                                                 |\n| hasura             | Hasura unique name                         | -                                                                 |\n| thegraph           | TheGraph unique name                       | -                                                                 |\n| portal             | Portal unique name                         | -                                                                 |\n| hd-private-key     | HD private key                             | -                                                                 |\n| minio              | MinIO unique name                          | -                                                                 |\n| ipfs               | IPFS unique name                           | -                                                                 |\n| custom-deployment  | Custom deployment unique name              | -                                                                 |\n| blockscout         | Blockscout unique name                     | -                                                                 |\n| dotEnvFile         | .env file content (store in secrets)       | -                                                                 |\n| dotEnvLocalFile    | .env.local file content (store in secrets) | -                                                                 |\n\n## Common Use Cases\n\n### Deploying Smart Contracts\n\n```yaml\n- name: Deploy Contract\n  uses: settlemint/settlemint-action@main\n  with:\n    command: scs hardhat deploy remote --accept-defaults\n    access-token: ${{ secrets.SETTLEMINT_ACCESS_TOKEN }}\n    workspace: ${{ vars.WORKSPACE_UNIQUE_NAME }}\n```\n\n### Managing Workspaces\n\n```yaml\n- name: List Workspaces\n  uses: settlemint/settlemint-action@main\n  with:\n    command: platform list workspaces\n    access-token: ${{ secrets.SETTLEMINT_ACCESS_TOKEN }}\n```\n\n### Custom Version Installation\n\n```yaml\n- name: Use Specific CLI Version\n  uses: settlemint/settlemint-action@main\n  with:\n    command: --version\n    version: \"1.0.0\"\n    access-token: ${{ secrets.SETTLEMINT_ACCESS_TOKEN }}\n```\n\n## Environment Variables\n\nAll inputs are automatically converted to environment variables with the `SETTLEMINT_` prefix. For example:\n\n- `workspace` → `SETTLEMINT_WORKSPACE`\n- `blockchain-network` → `SETTLEMINT_BLOCKCHAIN_NETWORK`\n\n### Environment Files\n\nThe action supports loading environment variables from `.env` files. You can provide the content of your env files through the following inputs:\n\n- `dotEnvFile`: Content of your main `.env` file\n- `dotEnvLocalFile`: Content of your `.env.local` file\n\n⚠️ **Important**: Always store env file contents in GitHub Secrets:\n\n```yaml\nsteps:\n  - uses: settlemint/settlemint-action@main\n    with:\n      dotEnvFile: ${{ secrets.MY_ENV_FILE }}\n      dotEnvLocalFile: ${{ secrets.MY_ENV_LOCAL }}\n      access-token: ${{ secrets.SETTLEMINT_ACCESS_TOKEN }}\n```\n\nThe action will process these files and add all variables to the GitHub Actions environment. It handles:\n\n- Comments (lines starting with #)\n- Empty lines\n- Quoted values\n- Values containing = signs\n- Trailing comments\n\n## Error Handling\n\nThe action will fail if:\n\n- Invalid access token is provided\n- Required inputs are missing\n- CLI command execution fails\n- Network connectivity issues occur\n\n## Security\n\n- Never commit your access token directly in workflows\n- Use GitHub Secrets for sensitive information\n- Consider using OIDC for token management in production\n\n## Security Best Practices\n\n### Handling Secrets 🔒\n\n- **NEVER** commit access tokens, private keys or any secrets directly in your workflow files or repository\n- **ALWAYS** use GitHub Secrets for sensitive information:\n\n  ```yaml\n  # ✅ CORRECT - Using GitHub Secrets\n  access-token: ${{ secrets.SETTLEMINT_ACCESS_TOKEN }}\n\n  # ❌ WRONG - NEVER do this\n  access-token: \"your-token-here\"  # This is a security risk!\n  ```\n\n- Use GitHub's OIDC (OpenID Connect) for token management in production environments\n- Regularly rotate your access tokens and secrets\n- Limit secret access to only the necessary workflows and repositories\n\n### Environment Variables\n\nWhen using .env files:\n\n```yaml\nsteps:\n  - uses: settlemint/settlemint-action@main\n    with:\n      dotEnvFile: ${{ secrets.ENV_FILE_CONTENT }} # Store as a secret!\n      access-token: ${{ secrets.SETTLEMINT_ACCESS_TOKEN }}\n```\n\n## Troubleshooting\n\n### Common Issues\n\n#### Invalid Access Token\n\n**Error**: `Failed to authenticate with SettleMint: Error: Process completed with exit code 1. Please check your access token.`\n\n**Solution**:\n\n- Ensure your access token is correctly stored in GitHub Secrets\n- Verify the token hasn't expired\n- Check that you're using the correct token format:\n  - Personal Access Tokens: `sm_pat_xxxxx`\n  - Application Tokens: `sm_app_xxxxx`\n\n#### Command Injection Prevention\n\n**Error**: `Command contains potentially dangerous characters. Please use simple commands only.`\n\n**Solution**:\n\n- Avoid using shell operators like `\u0026\u0026`, `||`, `;`, `|`, or backticks\n- Use simple, direct commands\n- If you need to run multiple commands, use multiple action steps\n\n#### Version Installation Failures\n\n**Error**: `Invalid version format: x.x.x. Must be a valid semver version or 'latest'`\n\n**Solution**:\n\n- Use valid semantic version numbers (e.g., `1.0.0`, `2.1.3`)\n- Use `latest` for the most recent version\n- Don't use version ranges or npm tags other than `latest`\n\n#### Environment Variable Issues\n\n**Problem**: Environment variables from `.env` files aren't being loaded\n\n**Solution**:\n\n- Ensure the env file content is stored in GitHub Secrets\n- Check that the file content follows the correct format:\n  ```\n  KEY=value\n  # Comments are supported\n  QUOTED_VALUE=\"value with spaces\"\n  ```\n- Verify no shell metacharacters are in your values\n\n#### CLI Not Found\n\n**Error**: `settlemint: command not found`\n\n**Solution**:\n\n- The action should automatically install the CLI\n- If using a self-hosted runner, ensure npm is available\n- Check the action logs for installation errors\n\n### Debugging Tips\n\n1. **Enable Debug Logging**:\n\n   ```yaml\n   - name: Run SettleMint CLI\n     uses: settlemint/settlemint-action@main\n     env:\n       ACTIONS_STEP_DEBUG: true\n     with:\n       command: \"your-command\"\n       access-token: ${{ secrets.SETTLEMINT_ACCESS_TOKEN }}\n   ```\n\n2. **Check Token Format**:\n   Personal access tokens start with `sm_pat_`, while application tokens start with `sm_app_`. The action behaves differently based on the token type.\n\n3. **Verify Workspace Connection**:\n   If auto-connect fails, try connecting manually first:\n\n   ```yaml\n   - name: Connect to Workspace\n     uses: settlemint/settlemint-action@main\n     with:\n       command: \"connect -w your-workspace-id\"\n       access-token: ${{ secrets.SETTLEMINT_ACCESS_TOKEN }}\n   ```\n\n4. **Cache Issues**:\n   The action caches CLI installations. If you experience issues, the cache will be automatically invalidated when changing versions.\n\n## Contributing\n\nContributions are welcome! Please read our [Contributing Guide](./.github/CONTRIBUTING.md) for details on our code of conduct and the process for submitting pull requests.\n\n## License\n\nThis project is licensed under the FSL-1.1-MIT License - see the [LICENSE](LICENSE) file for details.\n\n## Support\n\n- 📚 [SettleMint Documentation](https://console.settlemint.com/documentation)\n- 💬 [GitHub Issues](https://github.com/settlemint/settlemint-action/issues)\n- 📧 [Support Email](mailto:support@settlemint.com)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsettlemint%2Fsettlemint-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsettlemint%2Fsettlemint-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsettlemint%2Fsettlemint-action/lists"}