File tree Expand file tree Collapse file tree 4 files changed +70
-0
lines changed
Expand file tree Collapse file tree 4 files changed +70
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Update code.json inventory file
2+
3+ on :
4+ schedule :
5+ # Run every 5 minutes for testing.
6+ - cron : " */5 * * * *"
7+
8+ jobs :
9+ build :
10+ name : Build and Deploy
11+ runs-on : " ubuntu-latest"
12+
13+ env :
14+ # GHE_USERNAME:
15+ # GHE_PASSWORD:
16+ CF_USERNAME : ${{ secrets.CG_USERNAME}}
17+ CF_PASSWORD : ${{ secrets.CG_PASSWORD}}
18+
19+
20+ steps :
21+ - name : Check out code
22+ uses : actions/checkout@v2
23+
24+ - name : Make the cloudgov-deploy script executable
25+ run : chmod +x ./bin/deploy-cloudgov
26+
27+ - name : Deploy the app to cloud.gov
28+ run : ./bin/deploy-cloudgov
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ set -e
4+
5+ CF_LOGIN=" https://api.fr.cloud.gov"
6+ CF_ORG=" sandbox-epa"
7+ CF_SPACE=" ibarra.michelle"
8+ FRONTEND_NAME=" code-json-cg"
9+ FRONTEND_MANIFEST=" etc/manifests/frontend.yml"
10+
11+ # This directory is used to persist the Cloud Foundry credentials
12+ mkdir -p $HOME /.cf
13+
14+ # Container with Cloud Foundry client and blue-green-deploy, autopilot plug-ins
15+ docker pull governmentpaas/cf-cli:latest
16+
17+ # Execute all the CF commands via the container -- CircleCI provides docker
18+ # out-of-the-box, but not the CF command-line interface tools.
19+ cf_run () {
20+ docker run \
21+ --rm \
22+ -v $HOME /.cf:/root/.cf \
23+ -v $PWD :/app \
24+ -w /app \
25+ governmentpaas/cf-cli \
26+ cf " $@ "
27+ }
28+
29+ # Sign in to the cloud.gov space that the app will be deployed to.
30+ #
31+ # CF_USERNAME and CF_PASSWORD are set in the GitHub Actions environment
32+ #
33+ # They should be populated with a space deployer service key credentials, as described at:
34+ # https://cloud.gov/docs/services/cloud-gov-service-account/
35+ cf_run login -a $CF_LOGIN -u $CF_USERNAME -p $CF_PASSWORD -o $CF_ORG -s $CF_SPACE
36+
37+ cf_run push $FRONTEND_NAME -f $FRONTEND_MANIFEST
Original file line number Diff line number Diff line change 1+ applications :
2+ - name : code-json-cg
3+ memory : 64M
4+ domain : app.cloud.gov
5+ buildpack : https://github.com/cloudfoundry/staticfile-buildpack.git
You can’t perform that action at this time.
0 commit comments