-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci(deploy-allfunctions.yml): adicionar pipeline de deploy geral
adicionar pipeline de deploy geral com base nas modificações dos arquivos presentes em functions/lib
- Loading branch information
1 parent
cf16a09
commit 670043d
Showing
2 changed files
with
75 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
name: CD - Deploy all functions | ||
|
||
on: | ||
push: | ||
branches: ["main"] | ||
paths: | ||
- "functions/lib/**" | ||
|
||
jobs: | ||
unit-test: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ windows-latest, macos-latest, ubuntu-latest ] | ||
node: [ 16.x, 18.x, 20.x ] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: pnpm/action-setup@v2 | ||
with: | ||
version: 8 | ||
|
||
- name: Install Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node }} | ||
cache: "pnpm" | ||
|
||
- name: Install dependencies | ||
run: pnpm install --frozen-lockfile | ||
- name: Run unit tests | ||
run: pnpm run test | ||
|
||
deploy: | ||
runs-on: ubuntu-latest | ||
needs: [unit-test] | ||
env: | ||
GOOGLE_APPLICATION_CREDENTIALS: google-application-credentials.json | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: pnpm/action-setup@v2 | ||
with: | ||
version: 8 | ||
|
||
- name: Install Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node }} | ||
cache: "pnpm" | ||
|
||
- name: Install dependencies | ||
run: pnpm install --frozen-lockfile | ||
|
||
- name: Prepare Google Application Credentials | ||
run: | | ||
echo "${{secrets.GOOGLE_APP_CREDENTIALS_BASE64}}" | base64 --decode > "google-application-credentials.json" | ||
- name: Deploy cloud functions | ||
run: gcloud functions deploy DeleteKeyFunc --project ${{secrets.GOOGLE_PROJECT_ID}} --no-allow-unauthenticated --region=southamerica-east1 --trigger-http --runtime=nodejs18 --update-labels=module=signatures --source=. | ||
|
||
- name: Remove credentials file | ||
if: success() || failure() | ||
run: | | ||
rm google-application-credentials.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,17 @@ | ||
export * from "./storages/firestore/index" | ||
export * from "./storages/firestore/repositories/key" | ||
export * from './storages/firestore/index'; | ||
export * from './storages/firestore/repositories/key'; | ||
|
||
export * from "./utils/replace" | ||
export * from "./utils/response" | ||
export * from "./utils/httpHandler" | ||
export * from './utils/replace'; | ||
export * from './utils/response'; | ||
export * from './utils/httpHandler'; | ||
|
||
export * from "./entities/key" | ||
export * from './entities/key'; | ||
export * from './repositories/key'; | ||
|
||
export * from "./repositories/key" | ||
export * from './config/logger/contract'; | ||
export * from './config/logger/firebaseLogger/adapter'; | ||
|
||
export * from "./config/logger/contract" | ||
export * from "./config/logger/firebaseLogger/adapter" | ||
|
||
export * from "./errors/repositories/key" | ||
export * from "./errors/firestore/index" | ||
|
||
export * from "./filters/index" | ||
export * from './errors/repositories/key'; | ||
export * from './errors/firestore/index'; | ||
|
||
export * from './filters/index'; |