File tree 5 files changed +28
-19
lines changed
5 files changed +28
-19
lines changed Original file line number Diff line number Diff line change 1
- name : Deno
2
-
3
1
on :
4
2
push :
5
3
branches : ["main"]
@@ -12,14 +10,11 @@ permissions:
12
10
jobs :
13
11
test :
14
12
runs-on : ubuntu-latest
15
-
16
13
steps :
17
14
- uses : actions/checkout@v4
18
15
- uses : denoland/setup-deno@v1
19
- - run : deno fmt --check
20
- - run : deno lint
21
- - run : shopt -s globstar; deno check src/**/*.ts
22
- - run : deno test -A
16
+ - run : make lint
17
+ - run : make test
23
18
env :
24
19
BACKPORTER_GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
25
20
BACKPORTER_GITEA_FORK : GiteaBot/gitea
Original file line number Diff line number Diff line change 1
- name : Deploy to Fly
2
1
on :
3
2
push :
4
3
branches : ["main"]
4
+
5
5
jobs :
6
6
deploy :
7
- name : Deploy proxy
8
7
runs-on : ubuntu-latest
9
8
steps :
10
9
- uses : actions/checkout@v4
Original file line number Diff line number Diff line change 1
- name : Build Docker image
2
-
3
1
on : ["pull_request"]
4
2
5
3
env :
@@ -12,17 +10,14 @@ jobs:
12
10
contents : read
13
11
packages : write
14
12
steps :
15
- - name : Set up Docker Buildx
16
- uses : docker/setup-buildx-action@v2
17
- - name : Log in to the Container registry
18
- uses : docker/login-action@v2
13
+ - uses : docker/setup-buildx-action@v2
14
+ - uses : docker/login-action@v2
19
15
with :
20
16
registry : ${{ env.DOCKER_REGISTRY }}
21
17
username : ${{ github.actor }}
22
18
password : ${{ secrets.GITHUB_TOKEN }}
23
- - name : Extract metadata for Docker
19
+ - uses : docker/ metadata-action@v4
24
20
id : meta
25
- uses : docker/metadata-action@v4
26
21
with :
27
22
images : ${{ env.DOCKER_REGISTRY }}/${{ github.repository }}
28
23
tags : |
35
30
type=ref,event=pr
36
31
# set latest tag for default branch
37
32
type=raw,value=latest,enable={{is_default_branch}}
38
- - name : Build and push
39
- uses : docker/build-push-action@v4
33
+ - uses : docker/build-push-action@v4
40
34
with :
41
35
push : false
42
36
tags : ${{ steps.meta.outputs.tags }}
Original file line number Diff line number Diff line change
1
+ SRC_FILES := $(shell find src -type f -name '* .ts')
2
+
3
+ @PHONY : lint
4
+ lint :
5
+ @deno lint --quiet
6
+ @deno fmt --quiet --check
7
+ @deno check --quiet $(SRC_FILES )
8
+
9
+ @PHONY : fmt
10
+ fmt :
11
+ @deno fmt --quiet
12
+
13
+ @PHONY : test
14
+ test :
15
+ @deno test --quiet -A
Original file line number Diff line number Diff line change @@ -96,6 +96,12 @@ deno run --allow-net --allow-env --allow-run --allow-sys src/webhook.ts
96
96
This will spin up a web server on port 8000. You can then set up a GitHub
97
97
webhook on ` /trigger ` to run this bot.
98
98
99
+ ## Development
100
+
101
+ - ` make fmt ` runs the formatter
102
+ - ` make lint ` runs the linter and checks formatting and types
103
+ - ` make test ` runs the tests
104
+
99
105
## Contributing
100
106
101
107
Contributions are welcome!
You can’t perform that action at this time.
0 commit comments