forked from SwitchbladeBot/invidget
-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (46 loc) · 1.09 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
name: CI
on: [ push, pull_request_target ]
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@master
with:
annotate: true
- name: Standard
run: npx standard
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@master
- name: Setup Node
uses: actions/setup-node@master
with:
node-version: 16
- name: Install Dependencies
run: npm install
- name: Run Tests
run: npm test
env:
CI: true
build:
name: Docker
runs-on: ubuntu-latest
needs: [lint, test]
if: github.event_name == 'push'
steps:
- name: Checkout
uses: actions/checkout@master
- name: Build and publish to registry
uses: docker/build-push-action@master
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
repository: switchbladebot/invidget
tag_with_ref: true