10
10
11
11
runs-on : ubuntu-latest
12
12
13
+ permissions :
14
+ contents : ' read'
15
+ id-token : ' write'
16
+
13
17
steps :
14
- - uses : actions/checkout@v2
18
+ - uses : actions/checkout@v4
19
+
20
+ - uses : ' google-github-actions/auth@v2'
21
+ with :
22
+ project_id : ' genuine-flight-317411'
23
+ workload_identity_provider : ' projects/429189597230/locations/global/workloadIdentityPools/github/providers/robusta-repos'
24
+
25
+ - name : Set up gcloud CLI
26
+ uses : google-github-actions/setup-gcloud@v2
27
+ with :
28
+ project_id : genuine-flight-317411
29
+
30
+ - name : Configure Docker Registry
31
+ run : gcloud auth configure-docker us-central1-docker.pkg.dev
15
32
16
33
- name : Login to Docker Hub
17
34
uses : docker/login-action@v1
28
45
context : .
29
46
platforms : linux/arm64,linux/amd64
30
47
push : true
31
- tags : robustadev/krr:${{ github.ref_name }}
48
+ tags : |
49
+ robustadev/krr:${{ github.ref_name }}
50
+ us-central1-docker.pkg.dev/genuine-flight-317411/devel/krr:${{ github.ref_name }}
32
51
build-args : |
33
- BUILDKIT_INLINE_CACHE=1
34
-
35
- - name : Set up gcloud CLI
36
- uses :
google-github-actions/[email protected]
37
- with :
38
- service_account_key : ${{ secrets.GCP_SA_KEY }}
39
- project_id : genuine-flight-317411
40
- export_default_credentials : true
41
-
42
- # Configure Docker to use the gcloud command-line tool as a credential helper for authentication
43
- - name : Configure Docker
44
- run : |-
45
- gcloud auth configure-docker us-central1-docker.pkg.dev
46
-
47
- - name : Verify gcloud configuration
48
- run : |-
49
- gcloud config get-value project
50
-
51
- - name : Release Docker to old repo
52
- run : |-
53
- docker buildx build \
54
- --build-arg BUILDKIT_INLINE_CACHE=1 \
55
- --platform linux/arm64,linux/amd64 \
56
- --cache-from robustadev/krr:${{ github.ref_name }} \
57
- --tag us-central1-docker.pkg.dev/genuine-flight-317411/devel/krr:${{ github.ref_name }} \
58
- --push \
59
- .
52
+ BUILDKIT_INLINE_CACHE=1
0 commit comments