Skip to content

Commit a2be5b7

Browse files
authored
Merge branch 'main' into jaime-dev
2 parents 11b52a2 + f5f4d41 commit a2be5b7

File tree

4 files changed

+127
-6
lines changed

4 files changed

+127
-6
lines changed
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
on:
2+
workflow_call:
3+
inputs:
4+
environment:
5+
required: false
6+
type: string
7+
default: "dev"
8+
core_app:
9+
required: false
10+
type: string
11+
description: "Core app name"
12+
default: "polygon-docs"
13+
14+
env:
15+
REGISTRY: europe-west2-docker.pkg.dev/prj-polygonlabs-shared-prod/polygonlabs-docker-prod
16+
IMAGE_NAME: ${{ inputs.core_app }}
17+
OIDC_PROVIDER: projects/23849419004/locations/global/workloadIdentityPools/polygonlabs-shared-prod/providers/oidc-shared-prod
18+
OIDC_SERVICE_ACCOUNT: shared-prod-oidc-sa@prj-polygonlabs-shared-prod.iam.gserviceaccount.com
19+
20+
permissions:
21+
contents: read
22+
id-token: write
23+
24+
jobs:
25+
build_and_deploy:
26+
runs-on: ubuntu-latest
27+
environment: ${{ inputs.environment }}
28+
permissions:
29+
id-token: write
30+
contents: write
31+
pull-requests: write
32+
steps:
33+
- uses: actions/setup-python@v4
34+
with:
35+
python-version: '3.11'
36+
37+
- name: Install pipenv
38+
run: pip install pipenv
39+
40+
- name: Checkout Code Repository
41+
uses: actions/checkout@v4
42+
with:
43+
fetch-depth: 0
44+
45+
- name: Authenticate GitHub CLI
46+
run: gh auth login --with-token <<< "${{ secrets.GITHUB_TOKEN }}"
47+
48+
- name: Build Site
49+
run: |
50+
python build_branches.py -env "${{ inputs.environment }}"
51+
52+
- name: Set up Docker Buildx
53+
uses: docker/setup-buildx-action@v3
54+
55+
- name: Authenticate with GCP via OIDC
56+
uses: google-github-actions/auth@v2
57+
with:
58+
token_format: access_token
59+
workload_identity_provider: ${{ env.OIDC_PROVIDER }}
60+
service_account: ${{ env.OIDC_SERVICE_ACCOUNT }}
61+
62+
- name: Configure Artifact Registry authentication
63+
run: |
64+
echo '{"credHelpers": {"europe-west2-docker.pkg.dev": "gcloud"}}' > ~/.docker/config.json
65+
66+
- name: Extract metadata (tags, labels) for Docker
67+
id: meta
68+
uses: docker/metadata-action@v5
69+
with:
70+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
71+
tags: |
72+
type=ref,event=branch
73+
type=ref,event=pr
74+
type=semver,pattern={{version}}
75+
type=semver,pattern={{major}}.{{minor}}
76+
flavor: |
77+
latest=false
78+
79+
- name: Push to GCP Artifact Registry
80+
uses: docker/build-push-action@v6
81+
with:
82+
file: ${{ inputs.dockerfile_path }}
83+
context: ${{ inputs.dockerfile_context }}
84+
push: true
85+
tags: ${{ steps.meta.outputs.tags }}
86+
labels: ${{ steps.meta.outputs.labels }}
87+
cache-from: type=gha
88+
cache-to: type=gha,mode=max

.github/workflows/deploy_gcp.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Docs Deployment GCP
2+
3+
on:
4+
pull_request:
5+
types: [opened, reopened, synchronize]
6+
push:
7+
branches:
8+
- dev
9+
- main
10+
workflow_dispatch:
11+
inputs:
12+
environment:
13+
required: false
14+
type: choice
15+
description: "Select the environment to deploy to (only required for production deployment)"
16+
options:
17+
- staging
18+
- prod
19+
20+
jobs:
21+
deploy:
22+
if: |
23+
(github.event_name == 'pull_request' && startsWith(github.head_ref, 'hosted/')) ||
24+
(github.event_name == 'push' && github.ref == 'refs/heads/dev') ||
25+
(github.event_name == 'push' && github.ref == 'refs/heads/main') ||
26+
(github.event_name == 'workflow_dispatch' && inputs.environment == 'prod')
27+
uses: ./.github/workflows/build_and_deploy_gcp.yml
28+
with:
29+
environment: ${{ inputs.environment ||
30+
(github.ref == 'refs/heads/dev' && 'dev') ||
31+
(github.ref == 'refs/heads/main' && 'staging') ||
32+
(github.event_name == 'pull_request' && 'dev') ||
33+
'dev' }}
34+
secrets: inherit

docs/agglayer/architecture/pessimistic-proof.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ The AggLayer uses per-chain pessimistic proofs to ensure a complete view of all
2121
For any cross-chain token transfer to be finalized such that the token may be withdrawn on the underlying L1, a valid pessimistic proof must be generated. Each chain connected to the AggLayer is required to provide some of the inputs necessary for building a valid pessimistic proof.
2222

2323
!!! note
24-
For more on how the Agglayer settles bridge claims to the underlying L1, see: [Unified Bridge](../architecture/unified-bridge/)
24+
For more on how the Agglayer settles bridge claims to the underlying L1, see: [Unified Bridge](/agglayer/architecture/unified-bridge/)
25+
2526

2627
## Token State
2728
Each chain maintains a data structure called a **Local Exit Tree**, which contains only the messages and token transfers originating from it. In the unified bridge, Ethereum holds a **Global Exit Root**, which represents a tree containing all of the Local Exit Roots of chains integrated with the AggLayer.

docs/agglayer/architecture/unified-bridge.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,17 +41,15 @@ When the **Mainnet Exit Root** is updated in `PolygonZkEVMBridgeV2.sol`, the con
4141
## Bridge Service
4242

4343
### Chain Indexer Framework
44-
- An EVM blockchain data indexer that parses, sorts, and organizes blockchain data for the **Bridge Service API**.
45-
- Each Agglayer-connected chain has its own indexer instance.
46-
44+
An EVM blockchain data indexer that parses, sorts, and organizes blockchain data for the **Bridge Service API**. Each Agglayer-connected chain has its own indexer instance.
4745

4846
### Transaction API
4947
- Provides details of a bridge transaction initiated by or incoming to a user’s wallet address.
5048

5149
**API Endpoints:**
52-
- **Testnet:**
50+
**Testnet:**
5351
`https://api-gateway.polygon.technology/api/v3/transactions/testnet?userAddress={userAddress}`
54-
- **Mainnet:**
52+
**Mainnet:**
5553
`https://api-gateway.polygon.technology/api/v3/transactions/mainnet?userAddress={userAddress}`
5654

5755
### Proof Generation API

0 commit comments

Comments
 (0)