Skip to content

Commit f7f8110

Browse files
wo-ovtiwari-story0xHansLeemuharrem-avahitech
authored
Merge staging to main (#68)
* add gitleaks pre-commit hook * feat: use on chain staking params for locked token APR multiplier (#61) * added github workflows for docker image build and push to ECR (#63) * refactor: migrate CI/CD to reusable workflow with multi-env deploy - Replace inline ECR build + story-helm tag update with centralized reusable workflow from gha-workflows - Deploy to both staking-aeneid and staking-mainnet paths - Support staging (staging branch) and prod (main branch) environments - Remove old aws-reusable-helm-tag-update.yml (absorbed into reusable) * chore: remove legacy GCP CD workflow GCP infrastructure has been migrated to AWS. The aws-cd.yml workflow now handles all build and deploy operations. * Revert "chore: remove legacy GCP CD workflow" This reverts commit 2e7aa96. * Revert "refactor: migrate CI/CD to reusable workflow with multi-env deploy" This reverts commit c18a689. * Revert "added github workflows for docker image build and push to ECR (#63)" This reverts commit 9494cf1. * feat: migrate CD pipeline to reusable build-and-deploy workflow (#67) - Replace legacy GCP workflow with reusable-build-and-deploy - Deploy to 4 environments: staging/prod x aeneid/mainnet - Add workflow_dispatch for manual trigger support - Use STORY_DEPLOYMENTS_PUSH_TOKEN for cross-org deployment --------- Co-authored-by: Vinod Tiwari <vinod.tiwari@piplabs.xyz> Co-authored-by: Hans Lee <38912532+0xHansLee@users.noreply.github.com> Co-authored-by: muharrem <117837391+muharrem-avahitech@users.noreply.github.com>
1 parent 57a2ccc commit f7f8110

File tree

1 file changed

+15
-33
lines changed

1 file changed

+15
-33
lines changed

.github/workflows/cd.yml

Lines changed: 15 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,22 @@
1-
name: Build and Push Staking-api Image
1+
name: Build and Deploy Staking API
22

33
on:
44
push:
55
branches:
6-
- 'staging'
7-
- 'main'
6+
- staging
7+
- main
8+
workflow_dispatch:
89

910
jobs:
10-
define-params:
11-
runs-on: ubuntu-latest
12-
outputs:
13-
app_name: staking-api
14-
k8s_ns: staking
15-
image_tag: ${{ github.sha }}
16-
target_environment: ${{ (github.ref_name == 'main') && 'production' || 'staging' }}
17-
steps:
18-
- run: echo "Exposing target environment"
19-
20-
image-build:
21-
needs: define-params
22-
uses: storyprotocol/gha-workflows/.github/workflows/reusable-gcp-image-build-worker.yml@main
11+
build-and-deploy:
12+
uses: storyprotocol/gha-workflows/.github/workflows/reusable-build-and-deploy.yml@main
2313
with:
24-
app_name: ${{ needs.define-params.outputs.app_name }}
25-
k8s_ns: ${{ needs.define-params.outputs.k8s_ns }}
26-
target_environment: ${{ needs.define-params.outputs.target_environment }}
27-
image_tag: ${{ needs.define-params.outputs.image_tag }}
28-
dockerfile_path: "./Dockerfile"
29-
dockerfile_context: "."
30-
secrets: inherit
31-
32-
request-app-release:
33-
needs: [ define-params, image-build ]
34-
uses: storyprotocol/gha-workflows/.github/workflows/reusable-gcp-app-release-publisher.yml@main
35-
with:
36-
app_name: ${{ needs.define-params.outputs.app_name }}
37-
k8s_ns: ${{ needs.define-params.outputs.k8s_ns }}
38-
target_environment: ${{ needs.define-params.outputs.target_environment }}
39-
image_tag: ${{ needs.define-params.outputs.image_tag }}
40-
secrets: inherit
14+
app_name: staking-api
15+
dockerfile: ./Dockerfile
16+
deploy_env: ${{ github.ref_name == 'main' && 'prod' || 'stage' }}
17+
deploy_paths: |
18+
staking-aeneid/staking-api-aeneid
19+
staking-mainnet/staking-api-mainnet
20+
secrets:
21+
AWS_ROLE_ARN: ${{ github.ref_name == 'main' && vars.AWS_GITHUB_ROLE_ARN_PROD || vars.AWS_GITHUB_ROLE_ARN }}
22+
DEPLOY_TOKEN: ${{ secrets.STORY_DEPLOYMENTS_PUSH_TOKEN }}

0 commit comments

Comments
 (0)