chore(sync): 🔨 synced file(s) with seedcase-project/template-python-project #125
Workflow file for this run
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: Delete GitHub environment after merging | |
on: | |
pull_request: | |
types: [closed] | |
branches: | |
- main | |
jobs: | |
delete-environment: | |
# TODO: Remove this `if` and fix the workflow once we start deploying to Fly again. | |
if: false | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
# TODO: This wasn't working correctly. | |
# This removes left over environments in GitHub from the building and deploying. | |
- name: Clean up GitHub environment | |
run: | | |
gh api \ | |
--method DELETE \ | |
-H "Accept: application/vnd.github+json" \ | |
-H "X-GitHub-Api-Version: 2022-11-28" \ | |
/repos/seedcase-project/${{ github.event.repository.name }}/environments/pr-${{ github.event.number }} | |
env: | |
GH_TOKEN: ${{ secrets.DELETE_ENV_TOKEN }} |