Skip to content

Bump actions/checkout from 2 to 3 #91

Bump actions/checkout from 2 to 3

Bump actions/checkout from 2 to 3 #91

Workflow file for this run

name: Undeploy Branch
on:
workflow_dispatch: ~
pull_request:
types: [closed]
jobs:
undeploy:
runs-on: ubuntu-latest
# disable for PRs from forks
if: ${{ !github.event.pull_request.head.repo.fork }}
env:
TAG_NAME: ${{ github.head_ref }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup GCloud
uses: ./.github/actions/gcloud
with:
credentials_json: ${{ secrets.GCP_SA_KEY }}
- name: Set Docker image name
run: echo "IMAGE_NAME=eu.gcr.io/$GCP_PROJECT/turnilo" >> $GITHUB_ENV
- name: Undeploy app
run: |
gcloud run services delete turnilo-${TAG_NAME//[^a-z0-9]/-} \
--region europe-west1 \
--quiet
- name: Delete Docker image
run: |
gcloud container images delete $IMAGE_NAME:${TAG_NAME//[^a-z0-9]/-} --quiet