nightly restage #822
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: nightly restage | |
on: | |
schedule: | |
# 3am UTC | |
- cron: "0 3 * * *" | |
jobs: | |
restage: | |
runs-on: ubuntu-latest | |
container: governmentpaas/cf-cli | |
steps: | |
- name: restage | |
env: | |
CF_API: ${{ secrets.CF_API }} | |
CF_APP: ${{ secrets.CF_APP }} | |
CF_ORG: ${{ secrets.CF_ORG }} | |
CF_PASSWORD: ${{ secrets.CF_PASSWORD }} | |
CF_SPACE: ${{ secrets.CF_SPACE }} | |
CF_SPACE_DEV: ${{ secrets.CF_SPACE_DEV }} | |
CF_USERNAME: ${{ secrets.CF_USERNAME }} | |
# Log into prod, restage Charlie, then switch to dev and stop that | |
# instance, if it's running | |
run: | | |
cf login -a $CF_API -u $CF_USERNAME -p $CF_PASSWORD -o $CF_ORG -s $CF_SPACE | |
cf restage $CF_APP | |
cf target -s $CF_SPACE_DEV | |
cf stop $CF_APP | |
cf delete-service charlie-brain -f |