Skip to content

Commit 08086d1

Browse files
committed
change tracking removed in cicd
1 parent bdc0fcf commit 08086d1

File tree

3 files changed

+12
-53
lines changed

3 files changed

+12
-53
lines changed

.github/workflows/cd.yml

+8-51
Original file line numberDiff line numberDiff line change
@@ -27,47 +27,12 @@ permissions:
2727
contents: read
2828
pull-requests: read
2929
jobs:
30-
detect-changes:
31-
# only run this job when a PR is merged or manually triggered
32-
# if: github.event.pull_request.merged == true || github.event_name == 'workflow_dispatch'
33-
name: Detect Changes
34-
runs-on: ubuntu-latest
35-
env:
36-
# select environment based on branch or manual input
37-
ENVIRONMENT: ${{ inputs.environment || (github.ref == 'refs/heads/main' && 'staging') }}
38-
outputs:
39-
frontend_changed: ${{ steps.filter.outputs.frontend }}
40-
backend_changed: ${{ steps.filter.outputs.backend }}
41-
environment: ${{ env.ENVIRONMENT }}
42-
steps:
43-
- uses: actions/checkout@v4
44-
with:
45-
persist-credentials: false
46-
- name: Check changed files
47-
id: filter
48-
uses: dorny/paths-filter@v3
49-
with:
50-
filters: |
51-
frontend:
52-
- 'frontend/**'
53-
backend:
54-
- 'backend/**'
55-
- name: Export change detection outputs # Safely export outputs to env variables
56-
env:
57-
FRONTEND_CHANGED_OUTPUT: ${{ steps.filter.outputs.frontend }}
58-
BACKEND_CHANGED_OUTPUT: ${{ steps.filter.outputs.backend }}
59-
run: |
60-
# Safely write environment variables using printf to avoid template injection
61-
printf "FRONTEND_CHANGED=%q\n" "$FRONTEND_CHANGED_OUTPUT" >> "$GITHUB_ENV"
62-
printf "BACKEND_CHANGED=%q\n" "$BACKEND_CHANGED_OUTPUT" >> "$GITHUB_ENV"
63-
6430
build-and-push:
6531
permissions:
6632
id-token: write
6733
name: Build and Push Docker Images
6834
runs-on: ubuntu-latest
69-
needs: detect-changes
70-
environment: ${{ needs.detect-changes.outputs.environment }}
35+
environment: ${{ inputs.environment || (github.ref == 'refs/heads/main' && 'staging') }}
7136
strategy:
7237
matrix:
7338
service: [frontend, backend]
@@ -89,9 +54,6 @@ jobs:
8954
mask-password: "true"
9055
- name: Build and push Docker image
9156
id: build-and-push
92-
if: |
93-
(matrix.service == 'frontend' && needs.detect-changes.outputs.frontend_changed == 'true') ||
94-
(matrix.service == 'backend' && needs.detect-changes.outputs.backend_changed == 'true')
9557
env:
9658
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
9759
ECR_REPOSITORY_PREFIX: ${{ vars.ECR_REPOSITORY_PREFIX }}
@@ -108,9 +70,9 @@ jobs:
10870
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
10971
update-helm-values:
11072
name: Update Helm Values
111-
needs: [build-and-push, detect-changes]
73+
needs: [build-and-push]
11274
runs-on: ubuntu-latest
113-
environment: ${{ needs.detect-changes.outputs.environment }}
75+
environment: ${{ inputs.environment || (github.ref == 'refs/heads/main' && 'staging') }}
11476
steps:
11577
- name: Set up SSH for private repo access
11678
uses: webfactory/[email protected]
@@ -142,18 +104,13 @@ jobs:
142104
143105
VALUES_FILE="deployments/clusters/$CLUSTER_NAME/values/strata-apps-values.yaml"
144106
145-
# Added boolean validation function
146-
validate_boolean() { [[ "$1" == "true" || "$1" == "false" ]]; }
147107
148-
if [[ "$FRONTEND_CHANGED" == "true" ]]; then
149-
echo "Updating frontend tag in $VALUES_FILE"
150-
yq eval -i ".strataDashboard.frontend.image.tag = \"$SHORT_TAG\"" "$VALUES_FILE"
151-
fi
108+
echo "Updating frontend tag in $VALUES_FILE"
109+
yq eval -i ".strataDashboard.frontend.image.tag = \"$SHORT_TAG\"" "$VALUES_FILE"
110+
111+
echo "Updating backend tag in $VALUES_FILE"
112+
yq eval -i ".strataDashboard.backend.image.tag = \"$SHORT_TAG\"" "$VALUES_FILE"
152113
153-
if [[ "$BACKEND_CHANGED" == "true" ]]; then
154-
echo "Updating backend tag in $VALUES_FILE"
155-
yq eval -i ".strataDashboard.backend.image.tag = \"$SHORT_TAG\"" "$VALUES_FILE"
156-
fi
157114
158115
- name: Commit and push changes
159116
env:

backend/src/wallets.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ pub struct Wallet {
1818
/// Wallet balance in Wei
1919
balance: String,
2020
}
21+
2122
impl Wallet {
2223
pub fn new(address: String, balance: String) -> Self {
2324
Self { address, balance }
@@ -114,4 +115,4 @@ pub fn init_paymaster_wallets(config: &Config) -> SharedWallets {
114115
let deposit = Wallet::new(config.deposit_wallet(), "0".to_string());
115116
let validating = Wallet::new(config.validating_wallet(), "0".to_string());
116117
Arc::new(Mutex::new(PaymasterWallets::new(deposit, validating))) // ✅ Returns tokio::sync::Mutex
117-
}
118+
}

frontend/vite.config.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
import react from '@vitejs/plugin-react';
22
import { defineConfig } from 'vite';
33

4+
45
// https://vite.dev/config/
56
export default defineConfig({
67
plugins: [react()],
78
server: {
8-
allowedHosts: "all"
9+
allowedHosts: true
910
}
1011
})

0 commit comments

Comments
 (0)