-
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(workflows): corrigindo erro de paralelismo entre os workflows
- Loading branch information
1 parent
ff939a3
commit ecaf4c6
Showing
4 changed files
with
81 additions
and
106 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,72 @@ | ||
name: CD - Deploy CreateKeyFunc function | ||
|
||
on: | ||
push: | ||
branches: ["main"] | ||
paths: | ||
- ".github/workflows/deploy-functions.yml" | ||
- "functions/createKeyFunc/**" | ||
- "functions/updateKeyFunc/**" | ||
- "functions/lib/**" | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
id: git-clone | ||
name: Cloning repository | ||
|
||
- uses: dorny/paths-filter@v3 | ||
id: path-filter | ||
with: | ||
base: ${{ github.ref }} | ||
filters: | | ||
workflow: | ||
- ".github/workflows/deploy-functions.yml" | ||
createfunc: | ||
- "functions/createKeyFunc/**" | ||
updatefunc: | ||
- "functions/updateKeyFunc/**" | ||
lib: | ||
- "functions/lib/**" | ||
- name: Google auth | ||
uses: google-github-actions/auth@v1 | ||
id: gcp-auth | ||
if: steps.changes.outputs.createfunc == 'true' || steps.changes.outputs.lib == 'true' || steps.changes.workflow == 'true' | ||
with: | ||
credentials_json: '${{ secrets.GOOGLE_APP_CREDENTIALS_BASE64 }}' | ||
|
||
- name: Set up Cloud SDK | ||
uses: google-github-actions/setup-gcloud@v1 | ||
id: set-gcloud | ||
if: steps.changes.outputs.createfunc == 'true' || steps.changes.outputs.lib == 'true' || steps.changes.workflow == 'true' | ||
with: | ||
project_id: '${{ secrets.GOOGLE_PROJECT_ID }}' | ||
|
||
- name: Deploy cloud create key function | ||
id: deploy-create-key-func | ||
if: steps.changes.outputs.createfunc == 'true' || steps.changes.outputs.lib == 'true' || steps.changes.workflow == 'true' | ||
run: | | ||
gcloud functions deploy CreateKeyFunc \ | ||
--project ${{ secrets.GOOGLE_PROJECT_ID }} \ | ||
--no-allow-unauthenticated \ | ||
--region=${{ secrets.REGION }} \ | ||
--trigger-http \ | ||
--runtime=${{ secrets.RUNTIME }} \ | ||
--update-labels=module=signatures \ | ||
--source=. | ||
- name: Deploy cloud update key function | ||
id: deploy-update-key-func | ||
if: steps.changes.outputs.updatefunc == 'true' || steps.changes.outputs.lib == 'true' || steps.changes.workflow == 'true' | ||
run: | | ||
gcloud functions deploy UpdateKeyFunc \ | ||
--project ${{ secrets.GOOGLE_PROJECT_ID }} \ | ||
--no-allow-unauthenticated \ | ||
--region=${{ secrets.REGION }} \ | ||
--trigger-http \ | ||
--runtime=${{ secrets.RUNTIME }} \ | ||
--update-labels=module=signatures \ | ||
--source=. |
This file was deleted.
Oops, something went wrong.
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