Skip to content

Commit

Permalink
update the lockfile and deploy_api.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
nwaughachukwuma committed Nov 12, 2024
1 parent 80bdf54 commit 16d2646
Show file tree
Hide file tree
Showing 2 changed files with 243 additions and 260 deletions.
23 changes: 3 additions & 20 deletions .github/workflows/deploy_api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,12 @@ on:
pull_request:
paths:
- "api/**"
- "services/**"
- "utils_pkg/**"
- ".github/workflows/deploy_api.yml"
push:
branches:
- main
paths:
- "api/**"
- "services/**"
- "utils_pkg/**"
- ".github/workflows/deploy_api.yml"
tags:
- "release-*"
Expand All @@ -36,6 +32,7 @@ jobs:
outputs:
SHORT_SHA: ${{ steps.prepare_env.outputs.SHORT_SHA }}
VERSION: ${{ github.event_name == 'pull_request' && format('pr-{0}', github.event.number) || format('main-{0}', steps.prepare_env.outputs.SHORT_SHA) }}
TAGGED: ${{ steps.prepare_env.outputs.TAGGED }}
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -47,10 +44,6 @@ jobs:
SHORT_SHA=$(git rev-parse --short HEAD)
echo "SHORT_SHA=$SHORT_SHA" >> $GITHUB_OUTPUT
RAW=$(git branch -r --contains $SHORT_SHA)
TAG_BRANCH_NAME="${RAW##*/}"
echo "TAG_BRANCH_NAME=$TAG_BRANCH_NAME" >> $GITHUB_OUTPUT
deploy:
runs-on: ubuntu-latest
needs: [prepare]
Expand All @@ -74,21 +67,11 @@ jobs:
- uses: google-github-actions/setup-gcloud@v2
- run: gcloud config set app/cloud_build_timeout 300

- run: |
cp ./api/.dockerignore .dockerignore
cp ./api/.gcloudignore .gcloudignore
cp ./api/Dockerfile Dockerfile
cat .dockerignore
cat .gcloudignore
cat Dockerfile
- name: Deploy to Cloud Run
id: deploy
- id: deploy
uses: google-github-actions/deploy-cloudrun@v2
with:
service: ${{ env.SERVICE }}
source: ./
source: ./api
tag: ${{ env.VERSION }}
no_traffic: true
timeout: "5m"
Expand Down
Loading

0 comments on commit 16d2646

Please sign in to comment.