Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Normalize branch name in github actions #840

Merged
merged 3 commits into from
Feb 18, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/deploy-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ 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: |
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 \
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/undeploy-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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