-
Notifications
You must be signed in to change notification settings - Fork 0
87 lines (85 loc) · 3.36 KB
/
release.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
name: Version_Release
on:
push:
tags:
- v0.**
jobs:
test:
name: cargo test
runs-on: ubuntu-latest
services:
mongodb:
image: mongo:latest
ports:
- 27017:27017
options: >-
--health-cmd="mongosh --eval 'db.adminCommand({ ping: 1 })'"
--health-interval=30s
--health-timeout=10s
--health-retries=10
redis:
image: redis:latest
ports:
- 6379:6379
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- run: cargo test --all-features
env:
BUNGEE_API_KEY: ${{ secrets.BUNGEE_API_KEY }}
COINGECKO_API_KEY: ${{ secrets.COINGECKO_API_KEY }}
COVALENT_API_KEY: ${{ secrets.COVALENT_API_KEY }}
environment: Testing
container_img_build_push_gar:
needs: [test]
# Allow the job to fetch a GitHub ID token
permissions:
id-token: write
contents: read
# The plan is to build and push each docker image in parallel.
strategy:
matrix:
image:
- us-docker.pkg.dev/biconomy-prod/biconomy-prod/reflux
# LOCATION-docker.pkg.dev/PROJECT-ID/REPOSITORY/IMAGE
# {owner}/{repo}/.github/workflows/{filename}@{ref}
uses: bcnmy/devops/.github/workflows/container_img_build_push_gar.yaml@master
with:
image: ${{ matrix.image }}
dockerfile: Dockerfile
# GCP project where the identity provider is
# gcloud projects describe prj-workload-identity-001
gcp_project_number: '766873424314'
gcp_pool_id: 'pool-id-github-actions'
# gcp_provider_id: 'ga-GITHUB_REPO_NAME'
gcp_provider_id: 'ga-reflux'
# LOCATION-docker.pkg.dev/PROJECT-ID/REPOSITORY/IMAGE
gcp_registry: 'us-docker.pkg.dev/biconomy-prod/biconomy-prod/reflux'
gcp_service_account: '[email protected]'
deploy_prod:
needs: [container_img_build_push_gar]
# Allow the job to fetch a GitHub ID token
# runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
uses: bcnmy/devops/.github/workflows/deploy_to_gke.yaml@master
with:
environment: 'prod'
# GCP project where the identity provider is
# gcloud projects describe prj-workload-identity-001
gcp_project_number: '766873424314'
gcp_project_id: 'biconomy-prod'
gcp_bastion: ''
gcp_bastion_zone: ''
gcp_pool_id: 'pool-id-github-actions'
# created by devops/gcp/github-actions/configure_workload_identity_federation_with_github_actions_pipelines.sh
# gcp_provider_id: 'ga-GITHUB_REPO_NAME'
gcp_provider_id: 'ga-reflux'
# SERVICE_ACCOUNT_EMAIL="${SERVICE_ACCOUNT}@${PROJECT}.iam.gserviceaccount.com"
gcp_service_account: '[email protected]'
gcp_cluster_name: 'biconomy-prod'
gcp_cluster_location: 'us-east1'
use_internal_ip: false
deploy_command: './k8s/deploy_prod.sh ${GITHUB_REF:10}'