Skip to content

Clean dev instances #28

Clean dev instances

Clean dev instances #28

name: Clean dev instances
on:
delete:
pull_request:
branches:
- master
types:
- closed
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 }}'
service_account: '${{ vars.GCP_DEPLOYMENTS_SA }}'
- 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.GOOGLE_CLOUD_REGION }} --quiet