From 0d26b3c0bb6bfd0346378291e136ef9168f3a8b4 Mon Sep 17 00:00:00 2001 From: Katarzyna Zadurska Date: Fri, 18 Feb 2022 16:05:07 +0100 Subject: [PATCH 1/3] Normalize brach name WIP --- .github/workflows/deploy-branch.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy-branch.yml b/.github/workflows/deploy-branch.yml index e53677bf6..293410526 100644 --- a/.github/workflows/deploy-branch.yml +++ b/.github/workflows/deploy-branch.yml @@ -28,10 +28,10 @@ jobs: run: gcloud auth configure-docker --quiet - name: Build Docker image - run: docker build . -t $IMAGE_NAME:$REF_NAME + run: docker build . -t $IMAGE_NAME:${REF_NAME//[^a-z0-9]/-} - name: Push Docker image - run: docker push $IMAGE_NAME:$REF_NAME + run: docker push $IMAGE_NAME:${REF_NAME//[^a-z0-9]/-} - name: Deploy app run: | From a0fb83703ed0ff1038a5dc185ba16ffa2390ddff Mon Sep 17 00:00:00 2001 From: Katarzyna Zadurska Date: Fri, 18 Feb 2022 16:16:40 +0100 Subject: [PATCH 2/3] Normalize when deploying too --- .github/workflows/deploy-branch.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy-branch.yml b/.github/workflows/deploy-branch.yml index 293410526..1274151e0 100644 --- a/.github/workflows/deploy-branch.yml +++ b/.github/workflows/deploy-branch.yml @@ -36,7 +36,7 @@ jobs: - name: Deploy app run: | gcloud run deploy turnilo-${REF_NAME//[^a-z0-9]/-} \ - --image $IMAGE_NAME:$REF_NAME \ + --image $IMAGE_NAME:${REF_NAME//[^a-z0-9]/-} \ --region europe-west1 \ --platform managed \ --allow-unauthenticated \ From 6e3bde852c841f74b9f16d44dd7a8b45c6813a0f Mon Sep 17 00:00:00 2001 From: Katarzyna Zadurska Date: Fri, 18 Feb 2022 16:31:44 +0100 Subject: [PATCH 3/3] Add on undeploy --- .github/workflows/undeploy-branch.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/undeploy-branch.yml b/.github/workflows/undeploy-branch.yml index 9f7ed9b40..3532d2e5c 100644 --- a/.github/workflows/undeploy-branch.yml +++ b/.github/workflows/undeploy-branch.yml @@ -32,4 +32,4 @@ jobs: - name: Delete Docker image run: | - gcloud container images delete $IMAGE_NAME:$REF_NAME --quiet + gcloud container images delete $IMAGE_NAME:${REF_NAME//[^a-z0-9]/-} --quiet