Skip to content

Clean dev instances #43

Clean dev instances

Clean dev instances #43

name: Clean dev instances
on:
delete:
pull_request:
types:
- closed
permissions: read-all
jobs:
delete:
runs-on: ubuntu-latest
permissions:
contents: 'read'
id-token: 'write'
steps:
- name: Inject slug/short variables
uses: rlespinasse/[email protected]
- name: Authenticate to Google Cloud
id: auth
uses: google-github-actions/[email protected]
with:
workload_identity_provider: '${{ vars.GCP_WIF }}'
project_id: '${{ vars.GCP_PROJECT }}'
- name: Set up Cloud SDK
uses: google-github-actions/[email protected]
- name: Removing CR service
run: |
gcloud run services delete ${{ vars.APP_NAME }}-${{ env.GITHUB_HEAD_REF_SLUG || env.GITHUB_REF_SLUG }} --region=${{ vars.GCP_REGION }} --quiet