-
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3ca92fe
commit 037713d
Showing
13 changed files
with
260 additions
and
258 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 |
---|---|---|
@@ -1,93 +1,93 @@ | ||
name: Client Service | ||
name: Deploy Client | ||
|
||
on: | ||
push: | ||
branches: | ||
- release-client/** | ||
workflow_call: | ||
secrets: | ||
GCP_CREDENTIALS: | ||
required: true | ||
PUBLIC_API_KEY: | ||
required: true | ||
PUBLIC_AUTH_DOMAIN: | ||
required: true | ||
SERVICE_ACCOUNT: | ||
required: true | ||
STRIPE_API_KEY: | ||
required: true | ||
push: | ||
branches: | ||
- release-client/** | ||
workflow_call: | ||
secrets: | ||
GCP_CREDENTIALS: | ||
required: true | ||
PUBLIC_API_KEY: | ||
required: true | ||
PUBLIC_AUTH_DOMAIN: | ||
required: true | ||
SERVICE_ACCOUNT: | ||
required: true | ||
STRIPE_API_KEY: | ||
required: true | ||
|
||
env: | ||
GAR_LOCATION: europe-north1 | ||
PROJECT_ID: rusve-384620 | ||
REPOSITORY: rusve-repo | ||
SERVICE: client | ||
REGION: europe-north1 | ||
ENV: production | ||
DOMAIN: https://www.rusve.app | ||
URI_USERS_RUST: users-cdb5ecy4ia-lz.a.run.app | ||
URI_USERS_GO: users-go-cdb5ecy4ia-lz.a.run.app | ||
URI_UTILS: utils-cdb5ecy4ia-lz.a.run.app | ||
URI_NOTES_RUST: notes-cdb5ecy4ia-lz.a.run.app | ||
URI_NOTES_GO: notes-go-cdb5ecy4ia-lz.a.run.app | ||
URI_DIRECTUS: https://directus-cms.fly.dev | ||
PUBLIC_API_KEY: ${{ secrets.PUBLIC_API_KEY }} | ||
PUBLIC_AUTH_DOMAIN: ${{ secrets.PUBLIC_AUTH_DOMAIN }} | ||
SERVICE_ACCOUNT: ${{ secrets.SERVICE_ACCOUNT }} | ||
STRIPE_API_KEY: ${{ secrets.STRIPE_API_KEY }} | ||
GAR_LOCATION: europe-north1 | ||
PROJECT_ID: rusve-384620 | ||
REPOSITORY: rusve-repo | ||
SERVICE: client | ||
REGION: europe-north1 | ||
ENV: production | ||
DOMAIN: https://www.rusve.app | ||
URI_USERS_RUST: users-cdb5ecy4ia-lz.a.run.app | ||
URI_USERS_GO: users-go-cdb5ecy4ia-lz.a.run.app | ||
URI_UTILS: utils-cdb5ecy4ia-lz.a.run.app | ||
URI_NOTES_RUST: notes-cdb5ecy4ia-lz.a.run.app | ||
URI_NOTES_GO: notes-go-cdb5ecy4ia-lz.a.run.app | ||
URI_DIRECTUS: https://directus-cms.fly.dev | ||
PUBLIC_API_KEY: ${{ secrets.PUBLIC_API_KEY }} | ||
PUBLIC_AUTH_DOMAIN: ${{ secrets.PUBLIC_AUTH_DOMAIN }} | ||
SERVICE_ACCOUNT: ${{ secrets.SERVICE_ACCOUNT }} | ||
STRIPE_API_KEY: ${{ secrets.STRIPE_API_KEY }} | ||
|
||
permissions: | ||
contents: write | ||
id-token: write | ||
checks: write | ||
contents: write | ||
id-token: write | ||
checks: write | ||
|
||
jobs: | ||
lint: | ||
uses: ./.github/workflows/lint-client.yml | ||
deploy: | ||
needs: | ||
- lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Google Auth | ||
id: auth | ||
uses: 'google-github-actions/auth@v1' | ||
with: | ||
credentials_json: '${{ secrets.GCP_CREDENTIALS }}' | ||
- name: Docker Auth | ||
id: docker-auth | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ${{ env.GAR_LOCATION }}-docker.pkg.dev | ||
username: _json_key | ||
password: ${{ secrets.GCP_CREDENTIALS }} | ||
- name: Create .env.prod file | ||
run: | | ||
touch ./client/.env.prod | ||
echo ENV="$ENV" >> ./client/.env.prod | ||
echo DOMAIN="$DOMAIN" >> ./client/.env.prod | ||
echo URI_USERS_RUST="$URI_USERS_RUST" >> ./client/.env.prod | ||
echo URI_USERS_GO="$URI_USERS_GO" >> ./client/.env.prod | ||
echo URI_UTILS="$URI_UTILS" >> ./client/.env.prod | ||
echo URI_NOTES_RUST="$URI_NOTES_RUST" >> ./client/.env.prod | ||
echo URI_NOTES_GO="$URI_NOTES_GO" >> ./client/.env.prod | ||
echo URI_DIRECTUS="$URI_DIRECTUS" >> ./client/.env.prod | ||
echo STRIPE_API_KEY="$STRIPE_API_KEY" >> ./client/.env.prod | ||
echo PUBLIC_API_KEY="$PUBLIC_API_KEY" >> ./client/.env.prod | ||
echo PUBLIC_AUTH_DOMAIN="$PUBLIC_AUTH_DOMAIN" >> ./client/.env.prod | ||
echo SERVICE_ACCOUNT=\'$SERVICE_ACCOUNT\' >> ./client/.env.prod | ||
- name: Build and Push Container | ||
run: |- | ||
docker build -f ./client/Dockerfile -t "${{ env.GAR_LOCATION }}-docker.pkg.dev/${{ env.PROJECT_ID }}/${{ env.REPOSITORY }}/${{ env.SERVICE }}:${{ github.sha }}" ./client | ||
docker push "${{ env.GAR_LOCATION }}-docker.pkg.dev/${{ env.PROJECT_ID }}/${{ env.REPOSITORY }}/${{ env.SERVICE }}:${{ github.sha }}" | ||
- name: Deploy to Cloud Run | ||
id: deploy | ||
uses: google-github-actions/deploy-cloudrun@v1 | ||
with: | ||
service: ${{ env.SERVICE }} | ||
region: ${{ env.REGION }} | ||
image: ${{ env.GAR_LOCATION }}-docker.pkg.dev/${{ env.PROJECT_ID }}/${{ env.REPOSITORY }}/${{ env.SERVICE }}:${{ github.sha }} | ||
- name: Show Output | ||
run: echo ${{ steps.deploy.outputs.url }} | ||
lint: | ||
uses: ./.github/workflows/lint-client.yml | ||
deploy: | ||
needs: | ||
- lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Google Auth | ||
id: auth | ||
uses: "google-github-actions/auth@v1" | ||
with: | ||
credentials_json: "${{ secrets.GCP_CREDENTIALS }}" | ||
- name: Docker Auth | ||
id: docker-auth | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ${{ env.GAR_LOCATION }}-docker.pkg.dev | ||
username: _json_key | ||
password: ${{ secrets.GCP_CREDENTIALS }} | ||
- name: Create .env.prod file | ||
run: | | ||
touch ./client/.env.prod | ||
echo ENV="$ENV" >> ./client/.env.prod | ||
echo DOMAIN="$DOMAIN" >> ./client/.env.prod | ||
echo URI_USERS_RUST="$URI_USERS_RUST" >> ./client/.env.prod | ||
echo URI_USERS_GO="$URI_USERS_GO" >> ./client/.env.prod | ||
echo URI_UTILS="$URI_UTILS" >> ./client/.env.prod | ||
echo URI_NOTES_RUST="$URI_NOTES_RUST" >> ./client/.env.prod | ||
echo URI_NOTES_GO="$URI_NOTES_GO" >> ./client/.env.prod | ||
echo URI_DIRECTUS="$URI_DIRECTUS" >> ./client/.env.prod | ||
echo STRIPE_API_KEY="$STRIPE_API_KEY" >> ./client/.env.prod | ||
echo PUBLIC_API_KEY="$PUBLIC_API_KEY" >> ./client/.env.prod | ||
echo PUBLIC_AUTH_DOMAIN="$PUBLIC_AUTH_DOMAIN" >> ./client/.env.prod | ||
echo SERVICE_ACCOUNT=\'$SERVICE_ACCOUNT\' >> ./client/.env.prod | ||
- name: Build and Push Container | ||
run: |- | ||
docker build -f ./client/Dockerfile -t "${{ env.GAR_LOCATION }}-docker.pkg.dev/${{ env.PROJECT_ID }}/${{ env.REPOSITORY }}/${{ env.SERVICE }}:${{ github.sha }}" ./client | ||
docker push "${{ env.GAR_LOCATION }}-docker.pkg.dev/${{ env.PROJECT_ID }}/${{ env.REPOSITORY }}/${{ env.SERVICE }}:${{ github.sha }}" | ||
- name: Deploy to Cloud Run | ||
id: deploy | ||
uses: google-github-actions/deploy-cloudrun@v1 | ||
with: | ||
service: ${{ env.SERVICE }} | ||
region: ${{ env.REGION }} | ||
image: ${{ env.GAR_LOCATION }}-docker.pkg.dev/${{ env.PROJECT_ID }}/${{ env.REPOSITORY }}/${{ env.SERVICE }}:${{ github.sha }} | ||
- name: Show Output | ||
run: echo ${{ steps.deploy.outputs.url }} |
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
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Deploy Notes Service | ||
name: Deploy Notes Rust | ||
|
||
on: | ||
push: | ||
|
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
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Deploy Users Service | ||
name: Deploy Users Rust | ||
|
||
on: | ||
push: | ||
|
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 |
---|---|---|
@@ -1,42 +1,42 @@ | ||
name: Deploy | ||
on: | ||
push: | ||
branches: | ||
- release/** | ||
push: | ||
branches: | ||
- release/** | ||
|
||
permissions: | ||
contents: write | ||
id-token: write | ||
checks: write | ||
contents: write | ||
id-token: write | ||
checks: write | ||
|
||
jobs: | ||
deploy-client: | ||
uses: ./.github/workflows/deploy-client.yml | ||
secrets: | ||
GCP_CREDENTIALS: ${{ secrets.GCP_CREDENTIALS }} | ||
PUBLIC_API_KEY: ${{ secrets.PUBLIC_API_KEY }} | ||
PUBLIC_AUTH_DOMAIN: ${{ secrets.PUBLIC_AUTH_DOMAIN }} | ||
SERVICE_ACCOUNT: ${{ secrets.SERVICE_ACCOUNT }} | ||
STRIPE_API_KEY: ${{ secrets.STRIPE_API_KEY }} | ||
deploy-users: | ||
uses: ./.github/workflows/deploy-users.yml | ||
secrets: | ||
GCP_CREDENTIALS: ${{ secrets.GCP_CREDENTIALS }} | ||
DATABASE_URL: ${{ secrets.DATABASE_URL }} | ||
SENDGRID_API_KEY: ${{ secrets.SENDGRID_API_KEY }} | ||
deploy-users-go: | ||
uses: ./.github/workflows/deploy-users-go.yml | ||
secrets: | ||
GCP_CREDENTIALS: ${{ secrets.GCP_CREDENTIALS }} | ||
DATABASE_URL: ${{ secrets.DATABASE_URL }} | ||
SENDGRID_API_KEY: ${{ secrets.SENDGRID_API_KEY }} | ||
deploy-notes: | ||
uses: ./.github/workflows/deploy-notes.yml | ||
secrets: | ||
GCP_CREDENTIALS: ${{ secrets.GCP_CREDENTIALS }} | ||
DATABASE_URL: ${{ secrets.DATABASE_URL }} | ||
deploy-notes-go: | ||
uses: ./.github/workflows/deploy-notes-go.yml | ||
secrets: | ||
GCP_CREDENTIALS: ${{ secrets.GCP_CREDENTIALS }} | ||
DATABASE_URL: ${{ secrets.DATABASE_URL }} | ||
deploy-client: | ||
uses: ./.github/workflows/deploy-client.yml | ||
secrets: | ||
GCP_CREDENTIALS: ${{ secrets.GCP_CREDENTIALS }} | ||
PUBLIC_API_KEY: ${{ secrets.PUBLIC_API_KEY }} | ||
PUBLIC_AUTH_DOMAIN: ${{ secrets.PUBLIC_AUTH_DOMAIN }} | ||
SERVICE_ACCOUNT: ${{ secrets.SERVICE_ACCOUNT }} | ||
STRIPE_API_KEY: ${{ secrets.STRIPE_API_KEY }} | ||
deploy-users: | ||
uses: ./.github/workflows/deploy-users.yml | ||
secrets: | ||
GCP_CREDENTIALS: ${{ secrets.GCP_CREDENTIALS }} | ||
DATABASE_URL: ${{ secrets.DATABASE_URL }} | ||
SENDGRID_API_KEY: ${{ secrets.SENDGRID_API_KEY }} | ||
deploy-users-go: | ||
uses: ./.github/workflows/deploy-users-go.yml | ||
secrets: | ||
GCP_CREDENTIALS: ${{ secrets.GCP_CREDENTIALS }} | ||
DATABASE_URL: ${{ secrets.DATABASE_URL }} | ||
SENDGRID_API_KEY: ${{ secrets.SENDGRID_API_KEY }} | ||
deploy-notes: | ||
uses: ./.github/workflows/deploy-notes.yml | ||
secrets: | ||
GCP_CREDENTIALS: ${{ secrets.GCP_CREDENTIALS }} | ||
DATABASE_URL: ${{ secrets.DATABASE_URL }} | ||
deploy-notes-go: | ||
uses: ./.github/workflows/deploy-notes-go.yml | ||
secrets: | ||
GCP_CREDENTIALS: ${{ secrets.GCP_CREDENTIALS }} | ||
DATABASE_URL: ${{ secrets.DATABASE_URL }} |
Oops, something went wrong.