-
Notifications
You must be signed in to change notification settings - Fork 5
46 lines (38 loc) · 1017 Bytes
/
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
name: 'CI'
on:
- push
- pull_request
jobs:
lint:
runs-on: ubuntu-latest
strategy:
matrix:
linter: [prettier, eslint, depcheck]
steps:
- name: Git checkout
uses: actions/checkout@v2
- name: NPM install
run: npm install
- name: Check ${{ matrix.linter }} linter
run: npm run lint:${{ matrix.linter }}
build:
runs-on: ubuntu-latest
needs: lint
if: github.ref == 'refs/heads/main'
permissions:
contents: read
packages: write
steps:
- name: Git checkout
uses: actions/checkout@v2
- name: Docker build and publish to ghcr.io
uses: elgohr/Publish-Docker-Github-Action@master
with:
name: ${{ github.repository }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
registry: ghcr.io
- name: Deploy Container
env:
URL: ${{ secrets.DEPLOY_UPDATE_WEBHOOK }}
run: 'curl -i -X POST "$URL"'