diff --git a/.github/workflows/build-bd-ui-staging.yaml b/.github/workflows/build-bd-ui-staging.yaml index 52c0abebc6..daf0166ab2 100644 --- a/.github/workflows/build-bd-ui-staging.yaml +++ b/.github/workflows/build-bd-ui-staging.yaml @@ -24,16 +24,27 @@ jobs: with: fetch-depth: 0 - - name: Configure AWS credentials - uses: aws-actions/configure-aws-credentials@master + - name: 'Authenticate to Google Cloud' + uses: 'google-github-actions/auth@v1' with: - aws-region: us-east-1 - role-to-assume: arn:aws:iam::529724559987:role/gh-action-cicd - role-session-name: bd-ui-staging-build + workload_identity_provider: 'projects/184173984234/locations/global/workloadIdentityPools/oidc-github-identity-pool/providers/oidc-github-provider' + service_account: 'oidc-github-access@lavanet-staging.iam.gserviceaccount.com' - - name: Login to Amazon ECR - id: login-ecr - uses: aws-actions/amazon-ecr-login@v1 + - name: 'Set up GCP CLI' + uses: 'google-github-actions/setup-gcloud@v1' + + - name: 'GCP CLI Info' + run: | + gcloud info + gcloud auth list --filter=status:ACTIVE --format="value(account)" + + - name: 'GCP set project' + run: | + gcloud config set project lavanet-staging + + - name: 'Authenticate to Google Artifact' + run: | + gcloud auth configure-docker us-central1-docker.pkg.dev,europe-west4-docker.pkg.dev - name: Set up NOW environment variable id: "env-now" @@ -53,14 +64,14 @@ jobs: - name: Build, tag, and push docker image to Amazon ECR env: - REGISTRY: ${{ steps.login-ecr.outputs.registry }} + REGISTRY: "us-central1-docker.pkg.dev/lavanet-staging/growth-staging-us-central1/bd-ui-staging" IMAGE_TAG: ${{ github.sha }} NOW: ${{ env.NOW }} run: | docker buildx build \ - -t $REGISTRY/bd-ui:$IMAGE_TAG \ - -t $REGISTRY/bd-ui:latest \ - -t $REGISTRY/bd-ui:$IMAGE_TAG-$NOW \ + -t $REGISTRY:$IMAGE_TAG \ + -t $REGISTRY:latest \ + -t $REGISTRY:$IMAGE_TAG-$NOW \ --build-arg NEXT_PUBLIC_GRAPHQL_URL=https://bd-graphql.${{ secrets.STAGING_DOMAIN }}/v1/graphql \ --build-arg NEXT_PUBLIC_GRAPHQL_WS=wss://bd-graphql.${{ secrets.STAGING_DOMAIN }}/v1/graphql \ --build-arg NODE_ENV=production \ diff --git a/.github/workflows/build-bd-ui-zarak.yaml b/.github/workflows/build-bd-ui-testnet.yaml similarity index 71% rename from .github/workflows/build-bd-ui-zarak.yaml rename to .github/workflows/build-bd-ui-testnet.yaml index 28ac8a21a7..514a8bff1d 100644 --- a/.github/workflows/build-bd-ui-zarak.yaml +++ b/.github/workflows/build-bd-ui-testnet.yaml @@ -1,5 +1,5 @@ # This is a basic workflow to help you get started with Actions -name: Build Big Dipper UI (Zarak) +name: Build Big Dipper UI (Testnet) # Controls when the workflow will run on: @@ -23,16 +23,27 @@ jobs: with: fetch-depth: 0 - - name: Configure AWS credentials - uses: aws-actions/configure-aws-credentials@master + - name: 'Authenticate to Google Cloud' + uses: 'google-github-actions/auth@v1' with: - aws-region: us-east-1 - role-to-assume: arn:aws:iam::529724559987:role/gh-action-cicd - role-session-name: bd-ui-zarak-build + workload_identity_provider: 'projects/813817494934/locations/global/workloadIdentityPools/oidc-github-identity-pool/providers/oidc-github-provider' + service_account: 'oidc-github-access@lavanet-testnet.iam.gserviceaccount.com' - - name: Login to Amazon ECR - id: login-ecr - uses: aws-actions/amazon-ecr-login@v1 + - name: 'Set up GCP CLI' + uses: 'google-github-actions/setup-gcloud@v1' + + - name: 'GCP CLI Info' + run: | + gcloud info + gcloud auth list --filter=status:ACTIVE --format="value(account)" + + - name: 'GCP set project' + run: | + gcloud config set project lavanet-testnet + + - name: 'Authenticate to Google Artifact' + run: | + gcloud auth configure-docker us-central1-docker.pkg.dev,europe-west4-docker.pkg.dev - name: Set up NOW environment variable id: "env-now" @@ -52,14 +63,14 @@ jobs: - name: Build, tag, and push docker image to Amazon ECR env: - REGISTRY: ${{ steps.login-ecr.outputs.registry }} + REGISTRY: "us-central1-docker.pkg.dev/lavanet-testnet/growth-testnet-us-central1/bd-ui-testnet" IMAGE_TAG: ${{ github.sha }} NOW: ${{ env.NOW }} run: | docker buildx build \ - -t $REGISTRY/bd-ui-zarak:$IMAGE_TAG \ - -t $REGISTRY/bd-ui-zarak:$IMAGE_TAG-$NOW \ - -t $REGISTRY/bd-ui-zarak:latest \ + -t $REGISTRY:$IMAGE_TAG \ + -t $REGISTRY:$IMAGE_TAG-$NOW \ + -t $REGISTRY:latest \ --build-arg NEXT_PUBLIC_GRAPHQL_URL=https://bd-graphql.lavanet.xyz/v1/graphql \ --build-arg NEXT_PUBLIC_GRAPHQL_WS=wss://bd-graphql.lavanet.xyz/v1/graphql \ --build-arg NODE_ENV=production \