-
Notifications
You must be signed in to change notification settings - Fork 2
63 lines (52 loc) · 1.25 KB
/
stage.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
---
name: Stage
on:
workflow_dispatch:
push:
branches:
- master
paths:
- src/**
- Dockerfile
- package.json
- package-lock.json
concurrency:
group: stage-project
cancel-in-progress: true
jobs:
code:
runs-on: ubuntu-latest
name: Test project
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Install node 20
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
# required for testing
- name: Configure git
run: |
git config --global user.name "${{ github.actor }}"
git config --global user.email "${{ github.actor }}@users.noreply.github.com"
- name: Install project modules
run: npm ci
- name: Lint source files
run: npm run lint
- name: Run unit tests
run: npm test
image:
runs-on: ubuntu-latest
needs: [code]
name: Build image
steps:
- name: Setup docker buildx
uses: docker/setup-buildx-action@v3
- name: Build image
uses: docker/build-push-action@v5
with:
tags: tomerfi/version-bumper:staging
cache-from: type=gha
cache-to: type=gha,mode=max
load: true