41 lines
838 B
YAML
41 lines
838 B
YAML
name: CI script
|
|
|
|
on: push
|
|
|
|
jobs:
|
|
lint:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: 🏗 Setup repo
|
|
uses: actions/checkout@v3
|
|
|
|
- name: 🏗 Setup node
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version: 16.x
|
|
cache: 'yarn'
|
|
|
|
- name: 🏗 Install dependencies
|
|
run: yarn
|
|
|
|
- name: 📦 Lint with eslint
|
|
run: yarn lint
|
|
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: 🏗 Setup repo
|
|
uses: actions/checkout@v3
|
|
|
|
- name: 📦 Build docker image
|
|
run: |
|
|
docker build -t p2pix:$GITHUB_SHA .
|
|
docker save -o image_$GITHUB_SHA p2pix:$GITHUB_SHA
|
|
|
|
- name: 📦 Put docker image in cache
|
|
uses: actions/cache@v3
|
|
with:
|
|
key: p2pix
|
|
path: image_${{ github.sha }}
|
|
|
|
# test job |