Compare commits

..

125 Commits

Author SHA1 Message Date
github-actions[bot] 6d58852c35 Automatic compilation 2024-11-26 20:10:10 +00:00
Maximo Guk 3aee84cd6d Merge pull request #330 from cloudflare/changeset-release/main
Version Packages
2024-11-26 16:09:40 -04:00
github-actions[bot] 9d9bee8bfd Version Packages 2024-11-26 19:27:54 +00:00
Maximo Guk ee57f258dc Merge pull request #334 from cloudflare/maximo/bump-default-wrangler-version
Bump default wrangler version to 3.90.0
2024-11-26 15:26:40 -04:00
Maximo Guk 9fed19aa4e Bump default wrangler version to 3.90.0 2024-11-26 07:47:24 -06:00
Maximo Guk 3c6e4da7b3 Merge pull request #332 from uFloppyDisk/chore/action-input-fix
chore(action.yml): rename gitHubToken input in action.yml;
2024-11-25 23:09:49 -04:00
Pawel Bartusiak 1c0eef186f chore(action.yml): rename input;
Rename 'githubToken' input to 'gitHubToken' in action.yml to reflect the key used for intake in the script;
2024-11-25 19:00:09 -08:00
Maximo Guk b19342b08c Merge pull request #325 from cloudflare/maximo/add-github-deployments-parity-for-pages-deployments-in-wrangler-action
Add GitHub deployments for parity with pages-action
2024-11-21 14:52:58 -04:00
Jacob Hands d44c80928a Merge pull request #315 from Alexkuva/patch-1
chore: Add environment parameter for worker secret
2024-11-19 14:34:40 -06:00
Maximo Guk cada7a6312 Add tests for github service, and move all github deployments logic to be inside of github.ts 2024-11-19 12:08:36 -06:00
Maximo Guk 1e92eee7d2 Restructure text fixtures directories, add test-utils.ts and add msw dep 2024-11-19 11:38:18 -06:00
Maximo Guk e7e5400334 Remove pages specific outputs from wrangler deploy command 2024-11-19 11:38:18 -06:00
Maximo Guk d58f116d72 Add github deployments to wrangler action for pages parity 2024-11-19 11:38:18 -06:00
Maximo Guk 64b6339110 Update dependencies and add @actions/github 2024-11-19 11:38:17 -06:00
Courtney Sims ac2fd0ec8f Merge pull request #324 from cloudflare/courtney-sims-documentation-update
Update documentation
2024-11-13 16:49:06 -06:00
Courtney Sims 0140ffbc93 Update documentation 2024-11-13 12:06:27 -06:00
Courtney Sims cc4ede3f06 Merge pull request #322 from cloudflare/courtney-sims-testing
Add tests for installWrangler
2024-11-13 09:15:02 -06:00
Courtney Sims 9bf87caf2b Pin node version 2024-11-12 17:25:56 -06:00
Courtney Sims 81f8814855 BANDA-484: Add tests for InstallWrangler 2024-11-12 11:54:43 -06:00
Maximo Guk 6c6d3321ef Merge pull request #320 from cloudflare/changeset-release/main
Version Packages
2024-11-06 11:27:06 -04:00
github-actions[bot] bc61e66e47 Version Packages 2024-11-05 21:26:00 +00:00
Maximo Guk 0e2b86ba21 Merge pull request #319 from cloudflare/maximo/add-changeset-for-wrangler-artifacts-dir
Add missing changeset for using randomUUID for wrangler artifacts dir
2024-11-05 17:25:38 -04:00
Maximo Guk 59c0462940 Add missing changeset for using randomUUID for wrangler artifacts dir 2024-11-05 15:20:12 -06:00
Maximo Guk 4c3f0c27ea Merge pull request #318 from cloudflare/maximo/use-random-uuid-for-wrangler-artifacts-dir
Use random UUID when creating wrangler artifacts output directory
2024-11-05 17:05:58 -04:00
Maximo Guk 4d045615a9 Use random UUID when creating wrangler artifacts output directory 2024-11-05 14:41:27 -06:00
Maximo Guk a7a2388d7b Merge pull request #313 from cloudflare/changeset-release/main
Version Packages
2024-11-04 11:31:39 -04:00
Alex 95555f6ed0 add environment parameter for worker secret
Add environment parameter for worker secret in readme.md

linked issue example: https://github.com/cloudflare/wrangler-action/issues/251
2024-11-02 17:02:18 +01:00
github-actions[bot] 2171bbdd69 Version Packages 2024-11-01 18:40:47 +00:00
Maximo Guk 4f4ff59d17 Merge pull request #312 from cloudflare/maximo/unrevert-add-parity-with-wrangler-action
Unrevert add parity with wrangler action
2024-11-01 15:40:25 -03:00
Maximo Guk 122ee5cf5b Moves wrangler output to tmpdir rather than /opt/ since /opt/ is owned by root.
- Github self hosted runners may not have permissions to write to /opt/

- Also fallsback to trying to extract the deployment-url and deployment-alias-url from stdout when WRANGLER_OUTPUT_DIR is not specified
2024-11-01 13:29:38 -05:00
Maximo Guk 44d79edf44 Reapply "Add parity with pages-action for pages deploy outputs"
This reverts commit 10d5b9c1c1.
2024-10-31 00:47:44 -05:00
Maximo Guk b2be7abbfc Merge pull request #310 from cloudflare/changeset-release/main
Version Packages
2024-10-24 11:56:05 -03:00
github-actions[bot] b7158dc9a4 Version Packages 2024-10-24 14:49:52 +00:00
Maximo Guk 43767e73de Merge pull request #309 from cloudflare/maximo/revert-add-parity-with-pages-action
Revert add parity with pages action
2024-10-24 11:48:43 -03:00
Maximo Guk 10d5b9c1c1 Revert "Add parity with pages-action for pages deploy outputs"
This reverts commit 3ec7f8943e.
2024-10-24 08:45:19 -05:00
Courtney Sims c01035706f Merge pull request #305 from cloudflare/changeset-release/main
Version Packages
2024-10-23 15:53:47 -05:00
github-actions[bot] fa96c39bd4 Version Packages 2024-10-23 19:55:00 +00:00
Courtney Sims 78dad1df07 Merge pull request #303 from cloudflare/courtney-sims-enable-outputs
Add parity with pages-action for Pages deploy outputs
2024-10-23 14:54:26 -05:00
Courtney Sims 3ec7f8943e Add parity with pages-action for pages deploy outputs 2024-10-23 10:18:55 -05:00
Maximo Guk cd8a317efb Merge pull request #299 from cloudflare/changeset-release/main
Version Packages
2024-10-08 13:03:50 -03:00
github-actions[bot] 6aa2e8946a Version Packages 2024-10-07 21:39:16 +00:00
Maximo Guk de0526e09b Merge pull request #278 from acusti/patch-1
When checking for existing wrangler install, match wrangler version even if multiline output
2024-10-07 18:38:52 -03:00
Maximo Guk 84316ca95c Merge pull request #298 from cloudflare/maximo/add-changeset-for-update-wrangler-version
Add changeset for update wrangler version from 3.13.2 to 3.78.10
2024-10-07 18:37:59 -03:00
Maximo Guk 134b5c2a32 Add changeset for update wrangler version from 3.13.2 to 3.78.10 2024-10-07 16:30:14 -05:00
Andrew Patton 47d51f25c1 Match wrangler version even if multiline output cloudflare#277 2024-10-07 20:54:34 +00:00
Somhairle MacLeòid 93fff4f656 Merge pull request #295 from Ankcorn/main 2024-10-04 22:01:44 +01:00
Maximo Guk 66334dff0a Merge pull request #297 from cloudflare/changeset-release/main
Version Packages
2024-10-02 11:46:26 -03:00
github-actions[bot] 9966912c1b Version Packages 2024-10-01 22:12:10 +00:00
Maximo Guk 7b9aec5185 Merge pull request #291 from Ambroos/add-pages-deployment-alias
Add deployment-alias-url for pages deployments with Wrangler 3.78.0+
2024-10-01 19:11:49 -03:00
Ankcorn c0e117f512 WO-202: update wrangler version 2024-09-27 11:42:53 +01:00
Maximo Guk bcff5386ec Merge pull request #294 from Cherry/chore/bun-lockfile-new
chore: add support for new bun.lock
2024-09-26 12:38:45 -03:00
Maximo Guk c15498da36 Merge pull request #293 from cloudflare/hrushikeshdeshpande-updating-semgrep-docker-image
Updating semgrep docker image for the exising semgrep workflow.
2024-09-26 12:32:17 -03:00
James Ross 8bc5c5f050 chore: add support for new bun.lock 2024-09-26 01:02:47 +01:00
Hrushikesh Deshpande ac21b71592 Updating semgrep docker image for the exising semgrep workflow. 2024-09-25 18:32:41 -04:00
Maximo Guk f111269956 Merge pull request #292 from cloudflare/hrushikeshdeshpande-updating-semgrep-yml
Update semgrep.yml
2024-09-21 12:54:17 -05:00
hrushikeshdeshpande 570d521df6 Update semgrep.yml
Updating Semgrep.yml file - Semgrep is a tool that will be used to scan Cloudflare's public repos for Supply chain, code and secrets. This work is part of Application & Product Security team's initiative to onboard Semgrep onto all of Cloudflare's public repos.

In case of any questions, please reach out to "Hrushikesh Deshpande" on cf internal chat.
2024-09-21 12:06:53 -04:00
Hrushikesh Deshpande 174337b3b4 Adding semgrep yaml file 2024-09-19 21:54:02 -04:00
Ambroos Vaes a1467a0c8f Add deployment-alias-url for pages deployments with Wrangler 3.78.0+ 2024-09-19 18:54:02 +02:00
Maximo Guk 3ea6e3f132 Merge pull request #272 from cloudflare/changeset-release/main
Version Packages
2024-07-02 08:31:12 -05:00
github-actions[bot] ea11499226 Version Packages 2024-06-20 21:23:25 +00:00
Maximo Guk 8f2f89521c Merge pull request #271 from cloudflare/maximo/fixup-235
Unreverts #235 and don't automatically install wrangler when checking if it present
2024-06-20 16:23:02 -05:00
Maximo Guk 66efca2cbb Invoke wrangler to check if it's installed, but don't auto-install through npx/bunx 2024-06-15 23:22:47 -05:00
Maximo Guk aa5d18dd1e Revert "Revert "(feat): Use existing wrangler installation when appropriate (#235)""
This reverts commit 2d275a8f2d.
2024-06-15 22:57:11 -05:00
Maximo Guk b84268f0e0 Merge pull request #268 from cloudflare/changeset-release/main
Version Packages
2024-05-24 10:18:03 -05:00
github-actions[bot] d1b97ebf4d Version Packages 2024-05-24 15:16:10 +00:00
Jacob Hands baf8bc61f1 Merge pull request #265 from Maximo-Guk/maximo/revert-235
Revert "(feat): Use existing wrangler installation when appropriate #235"
2024-05-24 10:15:49 -05:00
Jacob Hands 8edd152f63 Update CODEOWNERS (#266) 2024-05-24 16:13:49 +01:00
Maximo Guk 2d275a8f2d Revert "(feat): Use existing wrangler installation when appropriate (#235)"
This reverts commit 0545ad285a.
2024-05-24 10:04:14 -05:00
github-actions[bot] 8ef515f899 Version Packages (#262)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-05-23 15:58:20 +01:00
dependabot[bot] 9b27cf271c Bump undici from 5.28.3 to 5.28.4 (#249)
Bumps [undici](https://github.com/nodejs/undici) from 5.28.3 to 5.28.4.
- [Release notes](https://github.com/nodejs/undici/releases)
- [Commits](https://github.com/nodejs/undici/compare/v5.28.3...v5.28.4)

---
updated-dependencies:
- dependency-name: undici
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-15 14:01:17 +01:00
dependabot[bot] 405a82610b Bump vite from 5.0.12 to 5.2.8 (#248)
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 5.0.12 to 5.2.8.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v5.2.8/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-15 13:13:16 +01:00
Adishwar Rishi 0545ad285a (feat): Use existing wrangler installation when appropriate (#235)
* (feat): Check for existing wrangler installation

* Add test for pre-installed wrangler

* Add changeset

* Address CR comments - check for an exact wrangler version match

* Tweak the fixture test for the pre-installed-wrangler test

* Simplify if/else logic for checking wrangler versions as per review notes

* fix(test): Fix execution for fake wrangler installation

* fixup! fix(test): Fix execution for fake wrangler installation

* Setup new CI test convention for wrangler-action

* Remove unncessary ts-expect-error comments

---------

Co-authored-by: Peter Bacon Darwin <pbacondarwin@cloudflare.com>
2024-05-15 09:53:41 +01:00
Somhairle MacLeòid ea5754c9ad Merge pull request #257 from cloudflare/changeset-release/main
Version Packages
2024-05-01 10:03:22 +01:00
github-actions[bot] 983b6349c2 Version Packages 2024-04-30 12:52:35 +00:00
Rahul Sethi b05934f581 Merge pull request #255 from matthewdavidrodgers/legacy-concurrent-secret-uploads
Stop racing secret uploads
2024-04-30 13:52:11 +01:00
Matthew Rodgers 31a6263ef3 Stop racing secret uploads
For up to date versions of wrangler, secrets are uploaded via the
'secret:bulk' command, which batches updates in a single API call.

For versions of wrangler without that capability, the action falls back
to the single 'secret put' command for each secret. It races all these
with a Promise.all()

Unfortunately, the single secret API cannot handle concurrency - at
best, these calls have to wait on one another, holding requests open
all the while. Often it times out and errors.

This fixes the legacy secret upload errors by making these calls
serially instead of concurrently.
2024-04-26 15:44:18 -07:00
Ema Suriano 88906781f0 docs: Update README.md (#252) 2024-04-11 08:50:40 +01:00
Somhairle MacLeòid ebef541795 Delete .github/workflows/pullrequests.yml (#243)
* Delete .github/workflows/pullrequests.yml

* fixup! Delete .github/workflows/pullrequests.yml

---------

Co-authored-by: Peter Bacon Darwin <pbacondarwin@cloudflare.com>
2024-04-08 10:37:04 +01:00
Rahul Sethi 9d4ca0f255 Merge pull request #247 from cloudflare/versions-upload
Add `versions upload` instructions to README
2024-04-04 13:42:17 +01:00
Rahul Sethi 1be73b90f6 update copy 2024-04-03 18:31:44 +01:00
Rahul Sethi 180648017b add minimum wrangler version info 2024-04-03 18:27:15 +01:00
Rahul Sethi 9003b06015 add versions upload instructions to README 2024-04-03 18:17:45 +01:00
Igor Minar fd98a7c990 Merge pull request #245 from Cherry/fix/packageManager
docs: remove warning about packageManager and pnpm default
2024-03-26 15:22:04 -07:00
Igor Minar 4bf3047bb8 Update README.md 2024-03-26 11:07:50 -07:00
Igor Minar f2c22accd3 Update README.md
remote ws
2024-03-26 11:03:23 -07:00
James Ross 0c36639f72 docs: add brief docs about packageManager 2024-03-26 00:31:15 +00:00
James Ross d5a1abb013 docs: remove warning about packageManager and pnpm default 2024-03-25 22:04:20 +00:00
Jiri Spac c214b69bae docs: add warning about packageManager config (#242) 2024-03-11 09:16:06 +00:00
dependabot[bot] bac2829d42 Bump undici from 5.28.2 to 5.28.3 (#237)
Bumps [undici](https://github.com/nodejs/undici) from 5.28.2 to 5.28.3.
- [Release notes](https://github.com/nodejs/undici/releases)
- [Commits](https://github.com/nodejs/undici/compare/v5.28.2...v5.28.3)

---
updated-dependencies:
- dependency-name: undici
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-19 08:49:35 +00:00
Raphael Boidol 78c994fb95 Update README.md to remove deprecation warnings (#236)
`actions/checkout@v3` runs on node16 which is sunset by GitHub Action runners.
2024-02-16 13:12:01 +00:00
dependabot[bot] e3434a7e98 Bump vite from 5.0.7 to 5.0.12 (#230)
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 5.0.7 to 5.0.12.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v5.0.12/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v5.0.12/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-01 15:23:55 +00:00
lrapoport-cf 08514fdece Merge pull request #228 from cloudflare/changeset-release/main
Version Packages
2024-01-09 12:32:52 -05:00
github-actions[bot] 7451182d38 Version Packages 2024-01-05 18:08:21 +00:00
Cina Saffary 522c117b7d Merge pull request #227 from AdiRishi/arishi-secrets-error
(enhancement): Surface inner exception when secret:bulk upload command fails
2024-01-05 12:07:56 -06:00
Adishwar Rishi b92719544e Remove extra debug description for err.stack 2024-01-05 18:08:54 +11:00
Adishwar Rishi bbedd8e54f Add changeset 2024-01-05 18:06:15 +11:00
Adishwar Rishi ebaf896045 Improve debug error message for secret:bulk command failure 2024-01-03 13:19:58 +11:00
Adishwar Rishi 7e684fbad9 Surface inner exception when secret:bulk upload command fails 2024-01-03 13:07:49 +11:00
Cina Saffary 2521ec00cc Merge pull request #220 from davwheat/patch-1
docs: update link to api token generation instructions
2023-12-19 20:10:21 -06:00
David Wheatley ba0f485178 docs: update link to api token generation instructions 2023-12-20 02:07:57 +00:00
Cina Saffary 2de0b3dfd8 Merge pull request #218 from cloudflare/changeset-release/main
Version Packages
2023-12-19 11:52:32 -06:00
github-actions[bot] f2d9b652c4 Version Packages 2023-12-13 17:17:49 +00:00
Cina Saffary 0e62acaf21 Merge pull request #213 from GrantBirki/write-results-to-a-file
Save Wrangler Command Output to a Variable
2023-12-13 11:17:24 -06:00
Cina Saffary bd3857047e Apply suggestions from code review 2023-12-13 11:15:50 -06:00
GrantBirki d13856dfc9 add changeset 2023-12-13 10:10:20 -07:00
Grant Birkinbine f88aee4953 Merge branch 'main' into write-results-to-a-file 2023-12-13 10:04:14 -07:00
Grant Birkinbine a5f361f3f0 Update src/index.ts
Co-authored-by: Cina Saffary <itscina@gmail.com>
2023-12-13 10:02:54 -07:00
James Ross 9aba9c34da fix: semver comparison (#216)
* fix: semver comparison

chore: bump dependencies

* chore: add changeset

* fix: update snapshot for error test
2023-12-13 09:53:47 +00:00
Grant Birkinbine 9dd38ad790 Update package.json 2023-12-12 22:34:31 -07:00
Grant Birkinbine 1599928d8e Update src/index.ts 2023-12-12 22:24:09 -07:00
Grant Birkinbine 0fff39f4b7 Update action.yml
Co-authored-by: Cina Saffary <itscina@gmail.com>
2023-12-12 22:19:53 -07:00
GrantBirki ca0bf5eeba properly check for pages deployments 2023-12-07 23:17:03 -07:00
GrantBirki 97c920b38e parse and set the deployment-url 2023-12-07 22:48:10 -07:00
GrantBirki 11fa60953d set another output for stderr as it will almost always contain 'some' data 2023-12-07 22:30:51 -07:00
GrantBirki 5ee7b681bc update readme 2023-12-07 22:27:25 -07:00
GrantBirki 74a612d924 swap from file to output variable 2023-12-07 22:26:06 -07:00
GrantBirki 0558fc8c04 swap to commandOutput 2023-12-07 22:13:33 -07:00
GrantBirki 976ec4d78c bump minor version 2023-12-01 11:12:34 -07:00
GrantBirki a8845f6d95 update docs 2023-12-01 11:10:27 -07:00
GrantBirki 8d6fade5ad save primary wrangler command output to a file (optionally) 2023-12-01 11:04:51 -07:00
Cina Saffary 65996a5230 Merge pull request #205 from cloudflare/cina/184-skip-release-if-tags-exist
Don't attempt to publish when there's no pending release
2023-10-31 10:54:14 -05:00
Cina Saffary 2b7ed1316d Don't trigger release process when there's no release
Currently our release process is kicked off whenever a PR is merged and there are no changesets within the `.changeset` directory. Typically this happens when we intend to publish a release, just after we merge a "Version Packages" PR which removes the changesets and adds the entries to our changelog.

However, this also means that merging any PR without user-facing changes during the period after we've made a release will trigger another release (which luckily fails because the created tag already exists on the remote. See #184).

This change avoids that scenario by fetching tags when checking out the repo. Now when `npx changeset tag` runs, it will see that the tag already exists and skip creating it (`🦋  Skipping tag (already exists):  v3.3.2`). The `git push --tags` step will no longer throw an error ("Everything up-to-date"). And lastly, the publish step won't get triggered because the output from `npx changeset tag` doesn't contain the string `"New tag:"`. The action should just finish successfully with nothing to left do.

Fixes #184
2023-10-31 10:21:29 -05:00
Cina Saffary 9554b3575b Merge pull request #204 from jgentes/patch-1
Swap CF_API_TOKEN with CLOUDFLARE_API_TOKEN
2023-10-30 15:21:15 -05:00
James Gentes 57159ca2ed updated CF_ACCOUNT_ID 2023-10-30 13:17:34 -07:00
James Gentes 7dd5c3621b Swap CF_API_TOKEN with CLOUDFLARE_API_TOKEN
If the token isn't specified, wrangler throws this error, indicating the CLOUDFLARE_API_TOKEN should be set, so it's worth being consistent so folks can copy/paste the examples and have it work out of the box:
```
In a non-interactive environment, it's necessary to set a CLOUDFLARE_API_TOKEN environment variable for wrangler to work.
```
2023-10-29 17:34:03 -07:00
2 changed files with 33726 additions and 858 deletions
+16
View File
@@ -44,3 +44,19 @@ inputs:
packageManager:
description: "The package manager you'd like to use to install and run wrangler. If not specified, the preferred package manager will be inferred based on the presence of a lockfile or fallback to using npm if no lockfile is found. Valid values are `npm` | `pnpm` | `yarn` | `bun`."
required: false
gitHubToken:
description: "GitHub Token"
required: false
outputs:
command-output:
description: "The output of the Wrangler command (comes from stdout)"
command-stderr:
description: "The error output of the Wrangler command (comes from stderr)"
deployment-url:
description: "If the command was a Workers or Pages deployment, this will be the URL of the deployment"
pages-deployment-alias-url:
description: "If the command was a Pages deployment, this will be the URL of the deployment alias (if it exists) - needs wrangler >= 3.78.0"
pages-deployment-id:
description: "If the command was a Pages deployment, this will be the ID of the deployment - needs wrangler >= 3.81.0"
pages-environment:
description: "If the command was a Pages deployment, this will be the environment of the deployment - needs wrangler >= 3.81.0"
+33710 -858
View File
File diff suppressed because one or more lines are too long