File tree Expand file tree Collapse file tree 2 files changed +22
-4
lines changed Expand file tree Collapse file tree 2 files changed +22
-4
lines changed Original file line number Diff line number Diff line change 5
5
branches :
6
6
- main
7
7
pull_request :
8
- branches :
9
- - main
8
+
9
+ permissions :
10
+ contents : read
11
+ id-token : write # required for GCP Workload Identity federation which we use to login into Google Artifact Registry
10
12
11
13
jobs :
12
14
lint :
13
15
runs-on : ubuntu-latest
14
16
15
17
steps :
16
18
- uses : actions/checkout@v4
19
+
17
20
- uses : pnpm/action-setup@v4
18
21
with :
19
22
version : 9.15.1
23
+
20
24
- uses : actions/setup-node@v4
21
25
with :
22
26
node-version : ' 23'
23
27
cache : ' pnpm'
24
28
registry-url : " https://registry.npmjs.org"
25
- - run : pnpm install --frozen-lockfile
29
+
30
+ - name : Authenticate to Google Cloud
31
+ uses : google-github-actions/auth@v2
32
+ with :
33
+ workload_identity_provider : ${{ vars.GCP_WORKLOAD_IDENTITY_PROVIDER }}
34
+ service_account : ${{ vars.GCP_SERVICE_ACCOUNT_EMAIL }}
35
+ create_credentials_file : true # This exports the GOOGLE_APPLICATION_CREDENTIALS env var which is commonly used by CLIs
36
+
37
+ - name : Login to GCP Artifact Registry
38
+ run : pnpm artifactregistry-login
39
+
40
+ - name : Install Dependencies
41
+ run : pnpm install --frozen-lockfile
42
+
26
43
- run : pnpm lint
Original file line number Diff line number Diff line change 6
6
"dev" : " turbo dev" ,
7
7
"lint" : " turbo lint" ,
8
8
"fmt" : " turbo run fmt" ,
9
- "spellcheck" : " turbo run spellcheck"
9
+ "spellcheck" : " turbo run spellcheck" ,
10
+ "artifactregistry-login" : " pnpm dlx google-artifactregistry-auth"
10
11
},
11
12
"dependencies" : {
12
13
"turbo" : " 2.5.0"
You can’t perform that action at this time.
0 commit comments