Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support wrangler2 - v2 #72

Conversation

WalshyDev
Copy link
Member

@WalshyDev WalshyDev commented May 5, 2022

Whooo! Wrangler 2 is awesome :)

Since this is v2 I did make 2 breaking changes but the migration path is super simple.

  • Remove publish: true with command: publish.

You can see it working for a Worker publish here: https://github.com/WalshyDev/wrangler-action-test/runs/6310845616?check_suite_focus=true

You can see it working for a Pages deployment here: https://github.com/WalshyDev/wrangler-action-test/runs/6327883564?check_suite_focus=true

cc: @GregBrimble @eidam @Ekwuno

action.yml Outdated Show resolved Hide resolved
entrypoint.sh Outdated Show resolved Hide resolved
@eidam
Copy link
Contributor

eidam commented May 6, 2022

LGTM! 🙏
EDIT: discovered some things while testing it

action.yml Outdated Show resolved Hide resolved
action.yml Show resolved Hide resolved
Copy link

@deadlypants1973 deadlypants1973 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PCX review

CHANGELOG.md Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
action.yml Outdated Show resolved Hide resolved
CHANGELOG.md Show resolved Hide resolved
CHANGELOG.md Show resolved Hide resolved
Copy link
Contributor

@petebacondarwin petebacondarwin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice update @WalshyDev - I think the action should still support setting the environment.

entrypoint.sh Outdated Show resolved Hide resolved
entrypoint.sh Show resolved Hide resolved
entrypoint.sh Outdated Show resolved Hide resolved
action.yml Outdated Show resolved Hide resolved
action.yml Show resolved Hide resolved
README.md Outdated
with:
apiToken: ${{ secrets.CF_API_TOKEN }}
command: publish
```

If you need help defining the correct cron syntax, check out [crontab.guru](https://crontab.guru/), which provides a friendly user interface for validating your cron schedule.

### Deploying on a "dispatched" event
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that mentioning dispatch event here at all is an implementation concern.
Instead what the user wants to do here is trigger a deploy manually...

Suggested change
### Deploying on a "dispatched" event
### Manually triggering a deployment

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
@WalshyDev WalshyDev force-pushed the walshy/pages-996-support-wrangler2 branch from 00dd53d to 5c36a64 Compare May 9, 2022 10:03
@WalshyDev WalshyDev force-pushed the walshy/pages-996-support-wrangler2 branch from 5c36a64 to 3c8fc21 Compare May 9, 2022 10:05
entrypoint.sh Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
Copy link
Member

@GregBrimble GregBrimble left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Left that one suggestion for the docs, but not-blocking, imo.

I'd wait for one or two more people to approve, and then we can merge!

@WalshyDev
Copy link
Member Author

By the way, I don't have write access on this repo so I cannot merge or cut a release.

@codewithkristian or @eidam would probably need to

CHANGELOG.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
entrypoint.sh Outdated Show resolved Hide resolved
@WalshyDev WalshyDev force-pushed the walshy/pages-996-support-wrangler2 branch from c42b80c to 3d1979c Compare May 9, 2022 10:49
@threepointone threepointone merged commit 4c10c18 into cloudflare:master May 9, 2022
@WalshyDev WalshyDev deleted the walshy/pages-996-support-wrangler2 branch May 9, 2022 11:03
To deploy static sites and frontend applications to Workers, check out the documentation for [Workers Sites](https://developers.cloudflare.com/workers/sites).

Note that this action makes no assumptions about _how_ your project is built! **If you need to run a pre-publish step, like building your application, you need to specify a build step in your Workflow.** For instance, if I have an NPM command called `build`, my workflow YAML might resemble the following:
You will need to add `account_id = ""` in your `wrangler.toml` file or set `accountId` in this GitHub Action.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Improved the error message around this.

@eidam
Copy link
Contributor

eidam commented Oct 11, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants