{"id":39076627,"url":"https://github.com/cloud-gov/cg-cli-tools","last_synced_at":"2026-01-17T18:27:09.850Z","repository":{"id":44641096,"uuid":"253327657","full_name":"cloud-gov/cg-cli-tools","owner":"cloud-gov","description":"A Github action for using cf CLI tools while deploying and managing apps on cloud.gov","archived":false,"fork":false,"pushed_at":"2025-05-22T22:14:34.000Z","size":50,"stargazers_count":10,"open_issues_count":4,"forks_count":18,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-05-22T23:37:42.029Z","etag":null,"topics":["actions","cd","cf-tasks","ci","tutorial"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/cloud-gov.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-04-05T20:38:27.000Z","updated_at":"2024-10-07T22:18:50.000Z","dependencies_parsed_at":"2024-02-06T20:23:54.155Z","dependency_job_id":"ef909f90-55a3-492e-a6c6-146b5614d975","html_url":"https://github.com/cloud-gov/cg-cli-tools","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/cloud-gov/cg-cli-tools","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloud-gov%2Fcg-cli-tools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloud-gov%2Fcg-cli-tools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloud-gov%2Fcg-cli-tools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloud-gov%2Fcg-cli-tools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cloud-gov","download_url":"https://codeload.github.com/cloud-gov/cg-cli-tools/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloud-gov%2Fcg-cli-tools/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28515479,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T17:57:59.192Z","status":"ssl_error","status_checked_at":"2026-01-17T17:57:52.527Z","response_time":85,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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","cd","cf-tasks","ci","tutorial"],"created_at":"2026-01-17T18:27:09.047Z","updated_at":"2026-01-17T18:27:09.787Z","avatar_url":"https://github.com/cloud-gov.png","language":"Shell","readme":"# Cloud.gov CF CLI Tools\n\nA Github action for using CF CLI tools while deploying and managing apps on [cloud.gov](https://cloud.gov).\n\n## Usage\n\nFollow the instructions for setting up a [cloud.gov service account](https://cloud.gov/docs/services/cloud-gov-service-account/). Store you username (CG_USERNAME) and password (CG_PASSWORD) as [encrypted secrets](https://help.github.com/en/actions/configuring-and-managing-workflows/creating-and-storing-encrypted-secrets).\n\n## Sample workflow\n\nThe following is an example of a workflow that uses this action. This example shows how to deploy a simple .NET Core app to cloud.gov\n\n```yml\nname: .NET Core Deploy\n\non:\n  pull_request:\n    branches: [ {branch-name} ]\n\njobs:\n  build:\n    runs-on: ubuntu-latest\n\n    steps:\n    - uses: actions/checkout@v2\n    - name: Setup .NET Core\n      uses: actions/setup-dotnet@v1\n      with:\n        dotnet-version: 3.1.101\n\n    - name: Install dependencies\n      run: dotnet restore\n      \n    - name: Build\n      run: dotnet build\n      \n  deploy:\n    runs-on: ubuntu-latest\n    needs: build\n    \n    steps:\n      - uses: actions/checkout@v2\n      - name: Deploy to cloud.gov\n        uses: cloud-gov/cg-cli-tools@main\n        with:\n          cf_username: ${{ secrets.CG_USERNAME }}\n          cf_password: ${{ secrets.CG_PASSWORD }}\n          cf_org: your-org\n          cf_space: your-space\n\n```\n\nThe default action is to do a `cf push -f manifest.yml --strategy rolling`.\n\nYou can also supply:\n\n- `cf_api:` to specify a Cloud Foundry API endpoint (instead of the default `api.fr.cloud.gov`)\n- `cf_manifest:` to use a different manifest file (instead of the default `manifest.yml`)\n- `cf_vars_file:` to [specify values for variables in the manifest file](https://docs.cloudfoundry.org/devguide/deploy-apps/manifest-attributes.html#variable-substitution)\n- `cf_command:` to specify a CF sub-command to run (instead of the default `push -f $MANIFEST -vars-file $VARS_FILE --strategy rolling`)\n- `command:` to specify another command altogether (for example: a script which checks if required services are present and creates them if they're missing)\n\n## A note on versions\n\nBy default this action uses the cf CLI v8 to take advantage of some of the [new features in that version](https://docs.cloudfoundry.org/cf-cli/v8.html#new-workflows). If you need to use v7 of the CLI, you can target the `cli-v7` branch when setting up your workflow, like so: `cloud-gov/cg-cli-tools@cli-v7`\n\n## Protecting secret values in attributes for the deployment\n\nIf you have secret values in the attributes (environment variables) of the deployment that should remain secret, it is best to use the `--var` flag with `cf push` in this action so that you can pass a Github secret to the command, which will automatically mask the variable in the deployment logs. Use `cf_command` like so: \n\n```\ncf_command: \"push -f \u003cMANIFEST\u003e --var var-name=${{ secrets.SECRET_VAR_VALUE }} --strategy rolling\"\n```\n\n**Example**: For the PHP Buildpack, if you want to use New Relic, all you have to do is [provide the license as an environment variable](https://docs.cloudfoundry.org/buildpacks/php/gsg-php-newrelic.html). However if you do not mask the environment variable as part of the deployment, subsequent deploys will show the license in the diff. \n\n## Other options\n\nThere are other tools and utilities that you can use to deploy your application to cloud.gov. Here is a list of some of the more common options.\n\n- \u003chttps://github.com/18F/cg-deploy-action\u003e\n- \u003chttps://github.com/usds/cloud-gov-cli\u003e\n- \u003chttps://github.com/alphagov/paas-docker-cloudfoundry-tools\u003e\n- \u003chttps://hub.docker.com/r/governmentpaas/cf-cli\u003e\n- \u003chttps://registry.terraform.io/providers/cloudfoundry-community/cloudfoundry/latest/docs\u003e\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloud-gov%2Fcg-cli-tools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcloud-gov%2Fcg-cli-tools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloud-gov%2Fcg-cli-tools/lists"}