Deactivate Environments #864
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: Deactivate Environments | |
| on: | |
| schedule: | |
| - cron: '0 21 * * *' | |
| jobs: | |
| deactivate-environments: | |
| name: Deactivate Environments | |
| permissions: | |
| id-token: write | |
| contents: read | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| - name: Setup Nomad | |
| uses: hashicorp/setup-nomad@v1.0.0 | |
| - name: Exchange GitHub JWT for Nomad token | |
| uses: RoboJackets/nomad-jwt-auth@main | |
| with: | |
| url: https://nomad.bcdc.robojackets.net | |
| jwtGithubAudience: https://nomad.bcdc.robojackets.net | |
| methodName: GitHubActions | |
| - name: Stop test | |
| env: | |
| NOMAD_ADDR: https://nomad.bcdc.robojackets.net | |
| continue-on-error: true | |
| run: | | |
| nomad stop apiary-test | |
| - name: Stop sandbox | |
| env: | |
| NOMAD_ADDR: https://nomad.bcdc.robojackets.net | |
| continue-on-error: true | |
| run: | | |
| nomad stop apiary-sandbox |