3 - Restart Apps #26102
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: 3 - Restart Apps | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: '11/10 * * * *' | |
| permissions: | |
| contents: read | |
| id-token: write | |
| actions: write | |
| jobs: | |
| restart: | |
| name: restart harvest app | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| environ: ["development", "staging", "prod"] | |
| environment: ${{ matrix.environ }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: checkout repo | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: gsa/datagov-harvester | |
| path: "./harvester" | |
| - name: restart datagov-harvest | |
| uses: cloud-gov/cg-cli-tools@main | |
| with: | |
| command: harvester/bin/check-and-renew datagov-harvest restart | |
| cf_org: gsa-datagov | |
| cf_space: ${{ matrix.environ }} | |
| cf_username: ${{secrets.CF_SERVICE_USER}} | |
| cf_password: ${{secrets.CF_SERVICE_AUTH}} | |
| - name: Create Issue if it fails 😢 | |
| if: ${{ failure() && github.ref == 'refs/heads/main' }} | |
| uses: JasonEtco/create-an-issue@v2 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.ADD_TO_PROJECT_PAT }} | |
| GITHUB_JOB: ${{ toJson(github)['job'] }} | |
| GITHUB_ATTEMPTS: ${{ github.run_attempt }} | |
| LAST_COMMIT: ${{ github.sha }} | |
| LAST_RUN_BY: ${{ github.actor }} | |
| RUN_ID: ${{ github.run_id }} | |
| REPO: ${{ github.repository }} | |
| with: | |
| filename: harvester/.github/restart_failure.md | |
| update_existing: true |