Skip to content

Commit

Permalink
deployment step added
Browse files Browse the repository at this point in the history
  • Loading branch information
Berat Genç authored and Berat Genç committed Jan 14, 2024
1 parent 5b8c8f6 commit 569eee0
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 24 deletions.
43 changes: 26 additions & 17 deletions .github/workflows/deployTest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,36 @@ name: Push Deployment
on:
push:
branches:
- "master"
- "master"

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Code Checkout
uses: 'actions/checkout@v4'
- name: Code Checkout
uses: 'actions/checkout@v4'

- name: Authenticate with Google Cloud
uses: 'google-github-actions/auth@v2'
with:
project_id: ${{ secrets.GCLOUD_PROJECT_ID }}
credentials_json: ${{ secrets.SERVICE_ACCOUNT_KEY }}
export_default_credentials: true
- name: Authenticate with Google Cloud
uses: 'google-github-actions/auth@v2'
with:
project_id: ${{ secrets.GCLOUD_PROJECT_ID }}
credentials_json: ${{ secrets.SERVICE_ACCOUNT_KEY }}
export_default_credentials: true

- name: Build and Push
env:
GCLOUD_PROJECT_ID: ${{ secrets.GCLOUD_PROJECT_ID }}
REPO: ${{ secrets.REPO }}
run: |
gcloud auth configure-docker europe-west1-docker.pkg.dev
docker build -t europe-west1-docker.pkg.dev/$GCLOUD_PROJECT_ID/$REPO/nestapp:latest .
docker push europe-west1-docker.pkg.dev/$GCLOUD_PROJECT_ID/$REPO/nestapp:latest
- name: Build and Push
env:
GCLOUD_PROJECT_ID: ${{ secrets.GCLOUD_PROJECT_ID }}
REPO: ${{ secrets.REPO }}
run: |
gcloud auth configure-docker europe-west1-docker.pkg.dev
docker build -t europe-west1-docker.pkg.dev/$GCLOUD_PROJECT_ID/$REPO/nestapp:latest .
docker push europe-west1-docker.pkg.dev/$GCLOUD_PROJECT_ID/$REPO/nestapp:latest
- name: Deploy
env:
GCLOUD_PROJECT_ID: ${{ secrets.GCLOUD_PROJECT_ID }}
REPO: ${{ secrets.REPO }}
run: |
gcloud run deploy task-manager \
--image=europe-west1-docker.pkg.dev/$GCLOUD_PROJECT_ID/$REPO/demo \
--allow-unauthenticated
11 changes: 9 additions & 2 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
{
"semi": false,
"singleQuote": true,
"trailingComma": "all"
}
"printWidth": 80,
"tabWidth": 2,
"trailingComma": "none",
"bracketSpacing": true,
"arrowParens": "avoid",
"proseWrap": "always",
"yamlBracketSpacing": false
}
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-prettier": "^5.0.0",
"jest": "^29.5.0",
"prettier": "^3.0.0",
"prettier": "3.2.2",
"source-map-support": "^0.5.21",
"supertest": "^6.3.3",
"ts-jest": "^29.1.0",
Expand Down

0 comments on commit 569eee0

Please sign in to comment.