Remove stale staging apps (#19034)
* Add a script to remove stale staging apps * Add a workflow to remove stale staging apps on a regular basis
This commit is contained in:
29
.github/workflows/remove-stale-staging-apps.yml
vendored
Normal file
29
.github/workflows/remove-stale-staging-apps.yml
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
name: Remove stale staging apps
|
||||
|
||||
# **What it does**:
|
||||
# This cleans up any rogue staging applications that outlasted the closure of
|
||||
# their corresponding pull requests.
|
||||
# **Why we have it**:
|
||||
# Staging applications sometimes fail to be destroyed when their corresponding
|
||||
# pull request is closed or merged.
|
||||
# **Who does it impact**:
|
||||
# Anyone with a closed, spammy, or deleted pull request in docs or docs-internal.
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '15,45 * * * *' # every thirty minutes at :15 and :45
|
||||
|
||||
jobs:
|
||||
remove_stale_staging_apps:
|
||||
name: Remove stale staging apps
|
||||
if: ${{ github.repository == 'github/docs-internal' }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
|
||||
- name: npm ci
|
||||
run: npm ci
|
||||
- name: Run script
|
||||
run: script/remove-stale-staging-apps.js
|
||||
env:
|
||||
HEROKU_API_TOKEN: ${{ secrets.HEROKU_API_TOKEN }}
|
||||
GITHUB_TOKEN: ${{ secrets.DOCUBOT_FR_PROJECT_BOARD_WORKFLOWS_REPO_ORG_READ_SCOPES }}
|
||||
Reference in New Issue
Block a user