feat: initial commit
Signed-off-by: Vojtěch Mareš <vojtech@mares.cz>
This commit is contained in:
commit
aaf191ed4d
5 changed files with 68 additions and 0 deletions
10
.editorconfig
Normal file
10
.editorconfig
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
root = true
|
||||
|
||||
[*]
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
charset = utf-8
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
end_of_line = lf
|
||||
max_line_length = null
|
||||
15
Dockerfile
Normal file
15
Dockerfile
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
FROM node:22-alpine
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
ENV PNPM_HOME="/root/.local/share/pnpm"
|
||||
ENV PATH="${PATH}:${PNPM_HOME}"
|
||||
|
||||
RUN apk add -U --no-cache ca-certificates
|
||||
RUN npm install --global pnpm
|
||||
|
||||
RUN pnpm install --global wrangler@latest
|
||||
|
||||
COPY entrypoint.sh /entrypoint.sh
|
||||
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
7
README.md
Normal file
7
README.md
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
# woodpecker-plugin / wrangler deploy
|
||||
|
||||
Simple Woodpecker CI plugin for deploying to Cloudflare Workers via Wrangler CLI.
|
||||
|
||||
## Development
|
||||
|
||||
- Woodpecker CI Docs: [Creating plugins](https://woodpecker-ci.org/docs/usage/plugins/creating-plugins)
|
||||
28
docs.md
Normal file
28
docs.md
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
---
|
||||
name: Wrangler Deploy
|
||||
icon: https://codeberg.org/woodpecker-plugins/prettier/raw/branch/main/prettier.png
|
||||
description: This plugin can be used to deploy applications to Cloudflare Workers via Wrangler CLI.
|
||||
author: Vojtěch Mareš
|
||||
tags: [cloudflare, wrangler-cli, deploy]
|
||||
containerImage: registry.mareshq.com/woodpecker-plugins/wrangler-deploy
|
||||
containerImageUrl: https://registry.mareshq.com/woodpecker-plugins/wrangler-deploy
|
||||
url: https://git.mareshq.com/woodpecker-plugins/wrangler-deploy
|
||||
---
|
||||
|
||||
# wrangler-deploy
|
||||
|
||||
This plugin can be used to deploy applications to [Cloudflare Workers](https://developers.cloudflare.com/workers/) via [Wrangler](https://developers.cloudflare.com/workers/wrangler/) CLI.
|
||||
|
||||
## Sample
|
||||
|
||||
```yaml
|
||||
steps:
|
||||
prettier:
|
||||
image: registry.mareshq.com/woodpecker-plugins/wrangler-deploy
|
||||
```
|
||||
|
||||
## Settings
|
||||
|
||||
| Settings Name | Type | Default | Description |
|
||||
| ------------- | ------- | ------- | --------------------------------------------------------------------------- |
|
||||
| `cloudflare_api_token` | string | empty | Cloudflare API Token, see [Authenticating Wrangler](https://developers.cloudflare.com/pub-sub/learning/command-line-wrangler/#authenticating-wrangler) |
|
||||
8
entrypoint.sh
Executable file
8
entrypoint.sh
Executable file
|
|
@ -0,0 +1,8 @@
|
|||
#! /bin/sh
|
||||
|
||||
if [ -z ${CLOUDFLARE_API_TOKEN+x} ]; then
|
||||
echo "ERROR: cloudflare_api_token setting is required."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
wrangler deploy
|
||||
Loading…
Add table
Add a link
Reference in a new issue