fix: fixed deploy_to_cf_workers workflow and others#104
Open
mdrkrg wants to merge 2 commits intovfarid:mainfrom
Open
fix: fixed deploy_to_cf_workers workflow and others#104mdrkrg wants to merge 2 commits intovfarid:mainfrom
mdrkrg wants to merge 2 commits intovfarid:mainfrom
Conversation
* changed deprecated `wrangler build` with `deploy --dry-run` * use env to set `CLOUDFLARE_API_TOKEN` and `CLOUDFLARE_ACCOUNT_ID` * renamed namespace `settings` to `v2ray_worker_settings` * update wrangler.toml to use `V2RAY_WORKER_KV_ID` secret * bump `compatibility_date` to 2025-02-18
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview of the problem
Wrangler has dropped support of flag
--api-tokenand--account-id. And the current workflow also has the problem thatsednot substituding with secret, and using globalwranglerinstead ofnpx wrangler.This PR only resolves the deployment problem, and doesn't resolve Worker 1011 problem.
Changes
The major change is changing
wrangler deploytonpx wrangler deploy(problem of #93) and adding the missing variable reference${{ secrets.KV_NAME }}.I've also removed no longer supported
--api-tokenand--account-idand uses variablesCLOUDFLARE_ACCOUNT_ID,CLOUDFLARE_API_TOKENinstead.Some other changes of this PR:
wrangler.tomlv2ray_worker_settingsKV_NAMEtoV2RAY_WORKER_KV_IDcompatibility_dateNotes
Please be cautious that I haven't tested the deployed worker yet. If there's any compability issues related to Cloudflare API compatiblity date just revert that line of code back to
compatibility_date = "2024-05-29".The
README-fa.mdis also not updated.