Skip to content

Commit 8d6fdb0

Browse files
authored
Merge pull request #76 from getlarge/74-featfile-storage-add-support-for-google-cloud-storage
feat(file-storage) add support for Google Cloud storage
2 parents e8126c6 + 53b725a commit 8d6fdb0

16 files changed

+1027
-213
lines changed

.github/workflows/node.yml

+30-6
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,15 @@ env:
2727
NX_CLOUD_DISTRIBUTED_EXECUTION: false
2828
NX_DISTRIBUTED_TASK_EXECUTION: false
2929
CI: true
30+
S3_BUCKET: ${{ vars.S3_BUCKET }}
31+
S3_REGION: ${{ vars.S3_REGION }}
32+
GC_BUCKET: ${{ vars.GC_BUCKET }}
33+
GC_PROJECT_ID: ${{ vars.GC_PROJECT_ID }}
34+
35+
permissions:
36+
contents: read
37+
pull-requests: write
38+
id-token: write
3039

3140
jobs:
3241
setup-and-test:
@@ -56,6 +65,19 @@ jobs:
5665
fetch-depth: 0
5766
ref: ${{ github.head_ref }}
5867

68+
- name: configure AWS credentials
69+
uses: mcblair/[email protected]
70+
with:
71+
role-arn: arn:aws:iam::555175933160:role/Github_Actions_S3
72+
profile-name: github-actions
73+
region: ${{ env.S3_REGION }}
74+
75+
- name: configure Google Cloud credentials
76+
uses: 'google-github-actions/auth@v2'
77+
with:
78+
project_id: ${{ env.GC_PROJECT_ID }}
79+
workload_identity_provider: 'projects/686264090118/locations/global/workloadIdentityPools/github/providers/nestjs-tools'
80+
5981
- name: Use Node.js ${{ matrix.node-version }}
6082
uses: actions/setup-node@v4
6183
with:
@@ -85,11 +107,13 @@ jobs:
85107
- name: Run checks
86108
env:
87109
CI: true
88-
S3_ACCESS_KEY_ID: ${{ secrets.S3_ACCESS_KEY_ID }}
89-
S3_BUCKET: ${{ secrets.S3_BUCKET }}
90-
S3_REGION: ${{ secrets.S3_REGION }}
91-
S3_ENDPOINT: ${{ secrets.S3_ENDPOINT }}
92-
S3_SECRET_ACCESS_KEY: ${{ secrets.S3_SECRET_ACCESS_KEY }}
110+
# S3_ACCESS_KEY_ID: ${{ secrets.S3_ACCESS_KEY_ID }}
111+
# S3_SECRET_ACCESS_KEY: ${{ secrets.S3_SECRET_ACCESS_KEY }}
112+
AWS_PROFILE: github-actions
113+
S3_BUCKET: ${{ env.S3_BUCKET }}
114+
S3_REGION: ${{ env.S3_REGION }}
115+
GC_BUCKET: ${{ env.GC_BUCKET }}
116+
GC_PROJECT_ID: ${{ env.GC_PROJECT_ID }}
93117
run: npx nx affected -t lint,test,build --parallel=3
94118

95119
- name: Upload coverage
@@ -106,7 +130,7 @@ jobs:
106130

107131
strategy:
108132
matrix:
109-
node-version: [18.x]
133+
node-version: [20.x]
110134

111135
steps:
112136
- name: Check out repository code

0 commit comments

Comments
 (0)