-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
72 lines (70 loc) · 1.61 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
name: Metrics
on:
push:
branches:
- v4-dev
#pull_request:
# branches:
# - v4-dev
# paths-ignore:
# - "**/*.md"
jobs:
# Lint, format, build and test
testing:
runs-on: ubuntu-latest
strategy:
matrix:
task:
- ci:lint
- ci:test
steps:
- uses: actions/checkout@v4
- uses: denoland/setup-deno@v1
- run: deno task make ${{ matrix.task }}
# GitHub CodeQL analysis
analyze:
runs-on: ubuntu-latest
needs:
- testing
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language:
- typescript
steps:
- uses: actions/checkout@v4
- uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
config: |
queries:
- uses: security-and-quality
paths-ignore:
- source/run/serve/imported.ts
- uses: github/codeql-action/analyze@v2
# Build and push Docker image
docker:
if: github.ref == 'refs/heads/v4-dev'
runs-on: ubuntu-latest
needs:
- analyze
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- uses: docker/login-action@v3
if: github.event_name == 'push'
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ github.token }}
- uses: docker/build-push-action@v5
with:
context: .
tags: ghcr.io/${{ github.repository }}:v4
push: ${{ github.event_name == 'push' }}