Skip to content

Commit 37b1a64

Browse files
committed
Merge remote-tracking branch 'upstream/master'
2 parents 2a9cd38 + 4cd8c61 commit 37b1a64

File tree

12 files changed

+301
-1758
lines changed

12 files changed

+301
-1758
lines changed

.dockerignore

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
node_modules
2+
Dockerfile*
3+
docker-compose*
4+
.dockerignore
5+
.git
6+
.gitignore
7+
.github
8+
.wrangler
9+
README.md
10+
LICENSE
11+
.vscode
12+
Makefile
13+
helm-charts
14+
.env
15+
.editorconfig
16+
.idea
17+
coverage*

.github/workflows/publish.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Publish
2+
3+
on:
4+
push:
5+
branches: ["master"]
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
name: Publish
11+
steps:
12+
- name: Checkout Repository
13+
uses: actions/checkout@v4
14+
- name: Login to GitHub Container Registry
15+
uses: docker/login-action@v3
16+
with:
17+
registry: ghcr.io
18+
username: ${{ github.actor }}
19+
password: ${{ secrets.GITHUB_TOKEN }}
20+
- name: Generate tag
21+
id: tag
22+
run: |
23+
ts=$(date +%s)
24+
branch=${GITHUB_REF##*/}
25+
echo "IMAGE_ID=${branch}-${GITHUB_SHA::8}-${ts}" >> "$GITHUB_OUTPUT"
26+
- name: Publish Docker image
27+
uses: docker/build-push-action@v5
28+
with:
29+
context: .
30+
push: true
31+
tags: |
32+
ghcr.io/jroy/disgit:latest
33+
ghcr.io/jroy/disgit:${{ steps.tag.outputs.IMAGE_ID }}

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
.idea/
22
node_modules/
3+
.storage
4+
.wrangler

Dockerfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
FROM jacoblincool/workerd:latest
2+
3+
COPY ./worker.capnp ./worker.capnp
4+
5+
EXPOSE 8080/tcp
6+
CMD ["serve", "--experimental", "--binary", "worker.capnp"]

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,16 @@ You can use this Cloudflare worker by following the steps after clicking the but
88

99
This repository is based on [JRoy/disgit](https://github.com/JRoy/disgit), deploying to IntellectualSites' CF workers via GitHub actions.
1010

11+
You can also deploy this using docker/docker-compose by cloning this repo and running
12+
`docker compose up --build -d`. The worker will be started on port 8080.
13+
14+
## Environment Variables
15+
digit has the following optional environment variables that you can use to customize your instance;
16+
- `IGNORED_BRANCHES_REGEX` - A regex pattern for branches that should be ignored
17+
- `IGNORED_BRANCHES` - A comma seperated list of branches that should be ignored
18+
- `IGNORED_USERS` - A comma seperated list of users that should be ignored
19+
- `IGNORED_PAYLOADS` - A comma seperated list of webhook events that should be ignored
20+
1121
## Supported Events
1222
The following webhook events are supported as of now;
1323
* [check_run](https://docs.github.com/en/developers/webhooks-and-events/webhook-events-and-payloads#check_run)

bun.lockb

34.6 KB
Binary file not shown.

docker-compose.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
services:
2+
worker:
3+
build: .
4+
image: worker
5+
environment:
6+
- IGNORED_BRANCH_REGEX=${IGNORED_BRANCH_REGEX}
7+
- IGNORED_BRANCHES=${IGNORED_BRANCHES}
8+
- IGNORED_USERS=${IGNORED_USERS}
9+
- IGNORED_PAYLOADS=${IGNORED_PAYLOADS}
10+
volumes:
11+
- ./.storage/cache:/worker/cache
12+
ports:
13+
- "8080:8080"

0 commit comments

Comments
 (0)