-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #30 from magicsword-io/beta
adds beta deploy
- Loading branch information
Showing
1 changed file
with
36 additions
and
0 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,36 @@ | ||
name: Deploy | ||
|
||
on: | ||
push: | ||
branches: | ||
- beta | ||
|
||
env: | ||
SERVICE_NAME: beta-sigconverter | ||
IMAGE_NAME: beta.sigconverter.io | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup Google Cloud SDK | ||
uses: google-github-actions/[email protected] | ||
with: | ||
project_id: ${{ secrets.PROJECT_ID }} | ||
service_account_key: ${{ secrets.GCLOUD_AUTH }} | ||
|
||
- name: Configure Docker | ||
run: gcloud auth configure-docker | ||
|
||
- name: Build Docker image | ||
run: docker build -t ${{ env.IMAGE_NAME }} . | ||
|
||
- name: Push Docker image to Google Container Registry | ||
run: gcloud builds submit --tag gcr.io/${{ secrets.PROJECT_ID }}/${{ env.IMAGE_NAME }} | ||
|
||
- name: Deploy to Google Cloud Run | ||
run: gcloud run deploy ${{ env.SERVICE_NAME }} --image gcr.io/${{ secrets.PROJECT_ID }}/${{ env.IMAGE_NAME }} --platform managed --region us-central1 |