{"id":18708837,"url":"https://github.com/oracle-actions/run-oci-cli-command","last_synced_at":"2025-10-25T00:04:10.523Z","repository":{"id":45373337,"uuid":"381308994","full_name":"oracle-actions/run-oci-cli-command","owner":"oracle-actions","description":"Run Oracle Cloud Infrastructure (OCI) CLI commands","archived":false,"fork":false,"pushed_at":"2024-11-17T08:03:51.000Z","size":792,"stargazers_count":28,"open_issues_count":5,"forks_count":9,"subscribers_count":5,"default_branch":"main","last_synced_at":"2024-12-06T07:03:59.466Z","etag":null,"topics":["actions","github-actions","oci-cli","oracle-cloud","oracle-cloud-infrastructure"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"upl-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/oracle-actions.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-06-29T09:25:21.000Z","updated_at":"2024-11-13T14:18:34.000Z","dependencies_parsed_at":"2024-09-10T04:05:47.641Z","dependency_job_id":"90019e8b-305d-4489-a6f5-d61961e4334c","html_url":"https://github.com/oracle-actions/run-oci-cli-command","commit_stats":{"total_commits":19,"total_committers":2,"mean_commits":9.5,"dds":"0.052631578947368474","last_synced_commit":"77974f233edf87c0850c585ff589996d02fe3d58"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oracle-actions%2Frun-oci-cli-command","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oracle-actions%2Frun-oci-cli-command/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oracle-actions%2Frun-oci-cli-command/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oracle-actions%2Frun-oci-cli-command/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oracle-actions","download_url":"https://codeload.github.com/oracle-actions/run-oci-cli-command/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230058242,"owners_count":18166228,"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":["actions","github-actions","oci-cli","oracle-cloud","oracle-cloud-infrastructure"],"created_at":"2024-11-07T12:25:23.602Z","updated_at":"2025-10-25T00:04:10.516Z","avatar_url":"https://github.com/oracle-actions.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# run-oci-cli-command\n\nThis GitHub Action installs the OCI CLI and then runs the specified command. This action will automatically cache the\nOCI CLI install to speed up any subsequent steps that use this action.\n\n## Required environment variables\n\nThe following [OCI CLI environment variables][1] must be defined for at least the `run-oci-cli-command` task:\n\n- `OCI_CLI_USER`\n- `OCI_CLI_TENANCY`\n- `OCI_CLI_FINGERPRINT`\n- `OCI_CLI_KEY_CONTENT`\n- `OCI_CLI_REGION`\n\nWe recommend using GitHub Secrets to store these values. If you have more than one `run-oci-cli-command` task, consider\n[defining your environment variables][2] at the job or workflow level.\n\n## Inputs\n\n- `command` (required): the [command and arguments][3] to provide to the `oci` tool.\n- `query`: (optional) a [JMESPath query][4] to run on the response JSON before output.\n\n### Output masking\n\nBy default, the output(s) from the command are masked from the GitHub Actions log and GitHub console, to prevent leaking\nany credential or confidential information. The following option will disable that masking and is intended for debugging\npurposes only:\n\n- `silent`: (Optional; default: _true_) If set to _false_ the action will not mask or suppress the command or outputs\n  from the logs or console.\n\n\u003e **Note:** the output does not need to be visible in the log to be used as an input by another task.\n\n## Outputs\n\n- `output`: will contain the results of the command.\n- `raw_output`: if the output of a given query is a single string value, `raw_output` will return the string without\n  surrounding quotes.\n\n\u003e **Note:** filtering the `output` or `raw_output` by piping it through another tool like `jq` may result in the\n\u003e filtered output being visible in the job logs. We recommend using the `query` parameter whenever possible.\n\nIf the result of the command is not valid JSON, it will not be visible unless `silent` is set to _false_.\n\n## Sample workflow\n\nThe following example lists all compute instances found in the `testing` compartment of the `OCI_CLI_TENANCY` in the\n`OCI_CLI_REGION` region.\n\nTo change the name of the compartment, modifying the `query` parameter of the `find-compartment-id` step.\n\nTo change which fields are returned, modify the `query` parameter of the `find-instances` step.\n\n```yaml\njobs:\n  my-instances:\n    runs-on: ubuntu-latest\n    name: List the display name and shape of the instances in my compartment\n    env:\n      OCI_CLI_USER: ${{ secrets.OCI_CLI_USER }}\n      OCI_CLI_TENANCY: ${{ secrets.OCI_CLI_TENANCY }}\n      OCI_CLI_FINGERPRINT: ${{ secrets.OCI_CLI_FINGERPRINT }}\n      OCI_CLI_KEY_CONTENT: ${{ secrets.OCI_CLI_KEY_CONTENT }}\n      OCI_CLI_REGION: ${{ secrets.OCI_CLI_REGION }}\n    steps:\n      - name: Retrieve the OCID of a named compartment in tenancy\n        uses: oracle-actions/run-oci-cli-command@v1.3.2\n        id: find-compartment-id\n        with:\n          command: 'iam compartment list --compartment-id-in-subtree=true'\n          query: \"data[?name=='testing'].id\"\n\n      - name: Retrieve the display name and shape of the instances in my compartment\n        uses: oracle-actions/run-oci-cli-command@v1.3.2\n        id: find-instances\n        with:\n          command: 'compute instance list --compartment-id ${{ steps.find-compartment-id.outputs.raw_output }}'\n          query: 'data[*].{name: \\\"display-name\\\", shape: shape}'\n\n      - name: List the display name and shape of the instances in my compartment\n        run: |\n          echo ${{ steps.find-instances.outputs.output }} | jq .\n```\n\nConsult the [JMESPath documentation][4] for details on how to create more complex queries and result formatting and\n[`action.yml`](./action.yml) for more detail on how to configure this action..\n\n## Contributing\n\nWe welcome contributions from the community. Before submitting a pull request, please\n[review our contribution guide](./CONTRIBUTING.md).\n\n## Security\n\nPlease consult the [security guide](./SECURITY.md) for our responsible security vulnerability disclosure process.\n\n## License\n\nCopyright (c) 2021, 2024, Oracle and/or its affiliates.\n\nReleased under the Universal Permissive License v1.0 as shown at \u003chttps://oss.oracle.com/licenses/upl/\u003e.\n\n[1]: https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/clienvironmentvariables.htm\n[2]: https://docs.github.com/en/actions/learn-github-actions/environment-variables\n[3]: https://docs.oracle.com/en-us/iaas/tools/oci-cli/3.2.0/oci_cli_docs/\n[4]: https://jmespath.org/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foracle-actions%2Frun-oci-cli-command","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foracle-actions%2Frun-oci-cli-command","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foracle-actions%2Frun-oci-cli-command/lists"}