An open API service indexing awesome lists of open source software.

https://github.com/usds/cloud-gov-cli

A Docker-based action to provide a cloud.gov command line for Github Actions
https://github.com/usds/cloud-gov-cli

Last synced: about 2 months ago
JSON representation

A Docker-based action to provide a cloud.gov command line for Github Actions

Awesome Lists containing this project

README

        

# Command-line Interface Action for cloud.gov

This is a re-usable action for use in continuous deployment workflows
using GitHub Actions, to allow automatic management of a deployment in
cloud.gov (or another Cloud Foundry instance).

Currently, this action uses its own [Dockerfile], which is based on Alpine
Linux 3.12 and version 8 of the Cloud Foundry CLI.

## Basic usage

The simplest use of this action is to deploy using an existing manifest. Given
a username and password (which should be stored as secrets), the default
behavior of the action is to log in using the Cloud Foundry CLI and
run `cf push`.

```yaml
- name: Deploy
uses: usds/cloud-gov-cli@master
with:
org: ${{secrets.CF_ORG}}
user: ${{secrets.SERVICE_USER}}
password: ${{secrets.SERVICE_AUTH}}
```

## Advanced usage

If desired, this action can run most CF CLI commands. The list of accepted
inputs below may or may not be exhaustive--see the `inputs` section of the
[action definition](./action.yml) to be sure you have seen them all.

* `command`: the cf-cli subcommand you wish to run. Default: `push`.
Additional arguments beyond the subcommand (e.g. `--strategy rolling`) should
be respected, though it is possible that they will interact oddly with the
way the optional arguments (application and manifest) are managed.
* `application`: the name of the application as deployed to cloud.gov.
If there is only one application in your manifest, this may not be needed (but some sub-commands require it in all cases).
* `user`: **(required)**: The username to authenticate with. Should be a service
user, not an actual human.
* `password` **(required)**: the password to authenticate with. Should be the
password for a service user, not your actual password!
* `manifest`: the location for the manifest file for this application (default: `./manifest.yml`)
* `org`: the Cloud Foundry organization that will be targeted by this deploy.
* `space`: the Cloud Foundry space that will be targeted by this deploy.
* `api`: the Cloud Foundry API server to address
(default: `https://api.fr.cloud.gov`)