Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 64f0dc5

Browse files
dikshant-infraclouddikshant-devops
authored andcommitted
added GH for prod (#178)
Co-authored-by: dikshant <raidikshant2@gmail.com>
1 parent 0fcbc58 commit 64f0dc5

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Deploy Grafana Server Cloud Run
2+
3+
on:
4+
push:
5+
branches:
6+
- fluxninja_micro_frontends
7+
paths:
8+
- "/**"
9+
workflow_dispatch:
10+
11+
jobs:
12+
build_and_deploy:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- uses: google-github-actions/auth@v2
18+
with:
19+
credentials_json: ${{ secrets.GOOGLECLOUDSA_PROD }}
20+
21+
- uses: docker/setup-buildx-action@v3
22+
23+
- name: Cache Docker layers
24+
uses: actions/cache@v4
25+
with:
26+
path: /tmp/.buildx-cache
27+
key: ${{ runner.os }}-${{ github.workflow }}-${{ github.sha }}
28+
restore-keys: ${{ runner.os }}-${{ github.workflow }}-
29+
30+
- run: gcloud auth configure-docker
31+
32+
- uses: docker/build-push-action@v5
33+
with:
34+
context: .
35+
push: true
36+
tags: gcr.io/coderabbitprod/grafana:latest
37+
cache-from: type=local,src=/tmp/.buildx-cache
38+
cache-to: type=local,dest=/tmp/.buildx-cache-new
39+
40+
- name: Move Docker cache
41+
run: |
42+
rm -rf /tmp/.buildx-cache
43+
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
44+
45+
# - name: Deploy to Cloud Run
46+
# run: gcloud run deploy grafana --image gcr.io/coderabbit/grafana:latest --region us-central1 --allow-unauthenticated --vpc-connector=coderabbitai-dev-cr

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /