File tree Expand file tree Collapse file tree 2 files changed +16
-3
lines changed
Github-Actions/Docker_Img-GCR Expand file tree Collapse file tree 2 files changed +16
-3
lines changed Original file line number Diff line number Diff line change 4
4
push :
5
5
branches :
6
6
- main
7
- pull_request :
8
- - main
9
7
10
8
env :
11
9
PROJECT_ID : ${{ secrets.GCP_PROJECT_ID }}
20
18
uses : actions/checkout@v2
21
19
22
20
- name : Authenticate with Google Cloud
23
- uses : google-github-actions/setup-gcloud@master
21
+ uses : google-github-actions/setup-gcloud@v1
24
22
with :
25
23
project_id : ${{ env.PROJECT_ID }}
26
24
service_account_key : ${{ secrets.GCLOUD_AUTH }}
Original file line number Diff line number Diff line change
1
+ # Build and Push Docker image to GCR
2
+
3
+ This github actions workflow is to build and push docker image to GCR
4
+
5
+ ### Step 1: Create ` Project ` on GCP
6
+
7
+ ### Step 2: Create a ` Service Account ` with the permission ` Storage Object Creator `
8
+
9
+ ### Step 3: Create ` Key ` using the created service account
10
+
11
+ ### Step 4: Navigate to ` GitHub Secrets ` and add the ` JSON ` file you get from the created ` Key `
12
+
13
+ Example of the secret name ` GCLOUD_AUTH `
14
+
15
+ ` NOTE: ` Make sure the ` Container Registry API ` are enabled
You can’t perform that action at this time.
0 commit comments