-
Notifications
You must be signed in to change notification settings - Fork 1
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 #1 from bootdotdev/lw_gcp
cicd
- Loading branch information
Showing
4 changed files
with
60 additions
and
19 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: cd | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
|
||
jobs: | ||
deploy: | ||
name: Deploy | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Set up Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: "1.20" | ||
|
||
- name: Check out code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Build app | ||
run: make | ||
|
||
- id: 'auth' | ||
uses: 'google-github-actions/auth@v1' | ||
with: | ||
credentials_json: '${{ secrets.GCP_CREDENTIALS }}' | ||
|
||
- name: 'Set up Cloud SDK' | ||
uses: 'google-github-actions/setup-gcloud@v1' | ||
|
||
- name: 'Build and push Docker image' | ||
run: 'gcloud builds submit --tag us-central1-docker.pkg.dev/learntocodefyi-prod/learntocodefyi-ar-repo/learntocodefyi:latest .' | ||
|
||
- name: 'Deploy to Cloud Run' | ||
run: 'gcloud run deploy learntocodefyi --image us-central1-docker.pkg.dev/learntocodefyi-prod/learntocodefyi-ar-repo/learntocodefyi:latest --region us-central1 --allow-unauthenticated --project learntocodefyi-prod' |
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,22 @@ | ||
name: ci | ||
|
||
on: | ||
pull_request: | ||
branches: [main] | ||
|
||
jobs: | ||
tests: | ||
name: Tests | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Set up Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: "1.21" | ||
|
||
- name: Check out code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Run unit tests | ||
run: go test ./... -cover |
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 |
---|---|---|
|
@@ -14,7 +14,7 @@ const ( | |
) | ||
|
||
const ( | ||
LearnToCodeFYIListID = "d9b0b0c0-5b0a-4b0a-9b0a-0b0a0b0a0b0a" | ||
LearnToCodeFYIListID = "ca9ecbeb-2741-4365-9e5e-600058798398" | ||
) | ||
|
||
// Client - | ||
|
@@ -33,7 +33,7 @@ func NewClient(apiKey, platform string) Client { | |
|
||
// SendMagicLink - | ||
func (c Client) SendMagicLink(toEmail, toName, loginLink string) error { | ||
const templateID = "d-a8edcea9806b4cdbbb72ff85b8efd93c" | ||
const templateID = "d-6e010242fdb54c819d93ce43f0e3a51c" | ||
const fromEmail = "[email protected]" | ||
const fromName = "LearnToCode.fyi" | ||
|
||
|