Skip to content
This repository was archived by the owner on Mar 5, 2024. It is now read-only.
/ cg-deploy-action Public archive

Github Action for deploying a cloud.gov application

Notifications You must be signed in to change notification settings

18F/cg-deploy-action

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cg-deploy-action

Github Action for deploying a cloud.gov application

DEPRECATED: This action has been deprecated in favor of an alternative GitHub Action supported by the cloud.gov team.

Example use

name: CD
on: [push]
jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2

      - name: Deploy to cloud.gov
        uses: 18f/cg-deploy-action@main
        env:
          OTHER_SECRET: ${{ secrets.OTHER_SECRET }}
        with:
          cf_username: ${{ secrets.CF_USERNAME }}
          cf_password: ${{ secrets.CF_PASSWORD }}
          cf_org: my-org-name
          cf_space: my-space-name
          push_arguments: >-
            --vars-file deploy_config.yml
            --var other_secret="$OTHER_SECRET"

      - name: Set environment variable
        uses: 18f/cg-deploy-action@main
        with:
          cf_username: ${{ secrets.CF_USERNAME }}
          cf_password: ${{ secrets.CF_PASSWORD }}
          cf_org: my-org-name
          cf_space: my-space-name
          full_command: "cf set-env APP_NAME DEPLOYED_SHA $GITHUB_SHA"

Important Gotcha

To use multiline strings for push_arguments or full_command use the >- form that tells yaml to strip out newlines

Inputs

Name Description Required Default
cf_username Deploy user cloud.gov username Yes
cf_password Deploy user cloud.gov password Yes
cf_org cloud.gov organization to deploy to Yes
cf_space cloud.gov space to deploy to Yes
push_arguments Additional arguments to pass to cf push No
cf_api API endpoint for cloudfoundry server No https://api.fr.cloud.gov
app_directory Directory to push to cloud.gov No ./
full_command Full command to run instead of cf push No

Outputs

None yet

Testing locally

Act can be used to run the test workflow locally.

  1. $ cp .secrets.example .secrets
  2. Create a space-deployer service account and copy the username and password into .secrets
  3. Set CF_ORG and CF_SPACE to your organization and space
  4. Run act: $ act

About

Github Action for deploying a cloud.gov application

Resources

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages