Restage apps #118
This file contains hidden or 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: Restage apps | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| environment: | |
| description: "Which environment needs to be restaged" | |
| required: true | |
| default: staging | |
| type: environment | |
| jobs: | |
| restage_apps: | |
| runs-on: ubuntu-latest | |
| environment: ${{ inputs.environment }} | |
| strategy: | |
| matrix: | |
| app: ["api", "admin"] | |
| steps: | |
| - name: get pwd | |
| shell: bash | |
| run: echo "$PWD" >> "$GITHUB_OUTPUT" | |
| - name: Restage ${{matrix.app}} | |
| uses: cloud-gov/cg-cli-tools@main | |
| with: | |
| cf_username: ${{ secrets.CLOUDGOV_USERNAME }} | |
| cf_password: ${{ secrets.CLOUDGOV_PASSWORD }} | |
| cf_org: gsa-tts-benefits-studio | |
| cf_space: notify-${{ inputs.environment }} | |
| command: | | |
| ls | |
| ls /home/runner/work/notifications-api/notifications-api/manifest.yml && cf push notify-${{matrix.app}}-${{inputs.environment}} -f /home/runner/work/notifications-api/notifications-api/manifest.yml | |
| cf restage --strategy rolling notify-${{matrix.app}}-${{inputs.environment}} | |
| - name: Restage ${{matrix.app}} egress | |
| uses: cloud-gov/cg-cli-tools@main | |
| with: | |
| cf_username: ${{ secrets.CLOUDGOV_USERNAME }} | |
| cf_password: ${{ secrets.CLOUDGOV_PASSWORD }} | |
| cf_org: gsa-tts-benefits-studio | |
| cf_space: notify-${{ inputs.environment }}-egress | |
| command: "cf restage --strategy rolling egress-proxy-notify-${{matrix.app}}-${{inputs.environment}}" |