Skip to content

Commit b0de534

Browse files
committed
automatically deploy to cloud run
1 parent ac5232c commit b0de534

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

.github/workflows/main.yaml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ jobs:
1212
# define Hugo cachedir so it is not version dependent
1313
HUGO_CACHEDIR: /tmp/hugo_cache
1414
IMAGE_NAME: 'lichturm-website'
15+
SERVICE_NAME: 'lichturm-website'
1516
IMAGE_TAG: 'prod'
1617
runs-on: 'ubuntu-latest'
1718
steps:
@@ -81,7 +82,7 @@ jobs:
8182
buildkitd-flags: '--debug'
8283

8384
# https://github.com/docker/build-push-action
84-
- name: Build and push
85+
- name: Build and push image
8586
uses: 'docker/build-push-action@v6'
8687
with:
8788
# we are not using the default git context because that would ignore our hugo build output
@@ -91,6 +92,14 @@ jobs:
9192
push: true
9293
tags: '${{ secrets.CONTAINER_REGISTRY_URL }}/${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }}'
9394

95+
# https://github.com/google-github-actions/deploy-cloudrun
96+
- name: Deploy Image to Cloud Run
97+
id: 'deploy'
98+
uses: 'google-github-actions/deploy-cloudrun@v2'
99+
with:
100+
service: '${{ env.SERVICE_NAME }}'
101+
image: '${{ secrets.CONTAINER_REGISTRY_URL }}/${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }}'
102+
94103
# once we are bored of building containers
95104
# - name: Install s3cmd
96105
# run: |

0 commit comments

Comments
 (0)