Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
a309dc1
Merge pull request #675 from maticnetwork/master
py-zoid Dec 6, 2024
bdbbbe0
GCP deployment update
sshrihar Feb 7, 2025
187560f
Add missing permissions
sshrihar Feb 10, 2025
a9c4195
Only publish on prod
sshrihar Feb 10, 2025
5094d93
Deploy to dev and master branch for docker image release
sshrihar Feb 10, 2025
4277e2c
Publish based on push to dev or master branch for gcp docker image
sshrihar Feb 10, 2025
641a633
Merge pull request #701 from maticnetwork/SPEC-889-github-workflow-fo…
sshrihar Feb 10, 2025
eb26c59
GCP docker publish images to artifact repository
sshrihar Feb 7, 2025
160fae0
Merge branch 'dev' of github.com:maticnetwork/polygon-token-list into…
sshrihar Feb 10, 2025
9b824dc
Merge pull request #702 from maticnetwork/SPEC-889-github-workflow-fo…
sshrihar Feb 10, 2025
b9cc0d8
Added 87 token/s: undefined
polygon-token-list-machine-user Jun 25, 2025
3c98016
Added 1 token/s: undefined
polygon-token-list-machine-user Jun 25, 2025
4f0cfe6
Merge pull request #766 from 0xPolygon/remi-gelinas/host-with-cf-workers
rgelinas-polygon Sep 4, 2025
c26170a
ci: add Wrangler dependency (#767)
rgelinas-polygon Sep 4, 2025
8c12642
fix(NO-JIRA): update wrangler pattern deployment
sshrihar Sep 8, 2025
25d7883
Merge pull request #770 from 0xPolygon/udpate-wrangler-pattern-deploy…
sshrihar Sep 8, 2025
79e5add
fix(NO-JIRA): reverting the change and correcting directory
sshrihar Sep 8, 2025
4b66ca2
Merge pull request #771 from 0xPolygon/udpate-wrangler-pattern-deploy…
sshrihar Sep 8, 2025
8111c54
fix(NO-JIRA): serve listRegistry.json at root
sshrihar Sep 8, 2025
6f34898
fix(NO-JIRA): updated indentations
sshrihar Sep 8, 2025
baf70c2
Merge pull request #772 from 0xPolygon/udpate-wrangler-pattern-deploy…
sshrihar Sep 8, 2025
7a07363
fix(NO-JIRA): fix to handle options request and root access
sshrihar Sep 9, 2025
27ca0d3
fix(NO-JIRA): update to double quotes for generateWorker.js
sshrihar Sep 9, 2025
11460b1
Merge pull request #773 from 0xPolygon/udpate-wrangler-pattern-deploy…
sshrihar Sep 11, 2025
ac74b6c
fix(NO-JIRA): handle cors issue with wildcard matching for domain
sshrihar Sep 11, 2025
44398cc
Merge pull request #774 from 0xPolygon/fix-cloudflare-deployment-scri…
sshrihar Sep 11, 2025
8a9dc96
add: custom usdc for xlayer mainnet
nitinmittal23 Sep 17, 2025
df2a780
Merge pull request #775 from 0xPolygon/usdc-xlayer
nitinmittal23 Sep 17, 2025
7039332
changing format for routes
okcan Sep 18, 2025
16ea75a
Merge pull request #779 from 0xPolygon/token-list
okcan Sep 18, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
run-name: Deploy ${{ github.ref_name }}

on:
push:
branches:
- master
- dev

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
get-env:
runs-on: ubuntu-latest
outputs:
env: ${{ steps.set-env.outputs.env }}
steps:
- id: set-env
run: |
if [ "${{ github.ref_name }}" == "master" ]; then
export ENV=production
fi

if [ "${{ github.ref_name }}" == "dev" ]; then
export ENV=staging
fi

echo "env=$ENV" >> "$GITHUB_OUTPUT"

build-and-deploy:
Comment on lines +15 to +31

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {}

Copilot Autofix

AI 7 months ago

To fix the problem, we should set a permissions: block at the workflow root (above jobs:), thereby limiting the permissions of GITHUB_TOKEN for all jobs within the workflow. Since this deploy workflow only checks out code and runs deployment steps using secrets, it likely only needs read access to repository contents, and does not require write access to contents, issues, or pull-requests. The minimal recommended block is:

permissions:
  contents: read

This change goes at the root level, after run-name and before on:. No other code changes are required. If future job steps require extra permissions, the block can be amended or overridden at job level.


Suggested changeset 1
.github/workflows/deploy.yaml

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml
--- a/.github/workflows/deploy.yaml
+++ b/.github/workflows/deploy.yaml
@@ -1,4 +1,6 @@
 run-name: Deploy ${{ github.ref_name }}
+permissions:
+  contents: read
 
 on:
   push:
EOF
@@ -1,4 +1,6 @@
run-name: Deploy ${{ github.ref_name }}
permissions:
contents: read

on:
push:
Copilot is powered by AI and may make mistakes. Always verify output.
needs: [get-env]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/setup-node@v5
- run: npm ci
- run: npm run build
- name: Deploy bundle
uses: cloudflare/wrangler-action@v3
with:
environment: ${{ needs.get-env.outputs.env }}
apiToken: ${{ secrets.CF_WORKER_API_TOKEN }}
accountId: ${{ secrets.CF_WORKER_ACCOUNT_ID }}
Comment on lines +32 to +44

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}

Copilot Autofix

AI 7 months ago

The best way to address this issue is to add an explicit permissions: block to the workflow or relevant job. Since nothing in the provided workflow appears to need write access via GITHUB_TOKEN, we should set the minimal required permissions, which is typically contents: read (necessary for actions/checkout and similar read-only operations). Adding this at the top level (root of the workflow file) ensures all jobs inherit this minimal permission, unless overridden per-job. This requires adding:

permissions:
  contents: read

immediately after the run-name: ... line and before the on: block. No imports or definitions are needed for this change, just an insertion in the workflow YAML.


Suggested changeset 1
.github/workflows/deploy.yaml

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml
--- a/.github/workflows/deploy.yaml
+++ b/.github/workflows/deploy.yaml
@@ -1,4 +1,6 @@
 run-name: Deploy ${{ github.ref_name }}
+permissions:
+  contents: read
 
 on:
   push:
EOF
@@ -1,4 +1,6 @@
run-name: Deploy ${{ github.ref_name }}
permissions:
contents: read

on:
push:
Copilot is powered by AI and may make mistakes. Always verify output.
75 changes: 0 additions & 75 deletions .github/workflows/ecs_prod.yml

This file was deleted.

2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
node_modules/
build/
.DS_STORE
.wrangler/
src/wrangler_main.js
12 changes: 0 additions & 12 deletions Dockerfile

This file was deleted.

Loading
Loading