This repository has been archived by the owner on Sep 11, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
85 lines (67 loc) · 1.96 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
73
74
75
76
77
78
79
80
81
82
83
84
85
name: "CI"
on:
push:
branches: [ "dev", "main" ]
pull_request:
branches: [ "dev", "main" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Prepare
run: cp ./.env.example ./.env.dev
- name: Install ruby
uses: ruby/setup-ruby@ec02537da5712d66d4d50a0f33b7eb52773b5ed1
with:
ruby-version: '3.2.0'
- uses: satackey/[email protected]
continue-on-error: true
- name: Build image
run: make ci-build
- name: Save image
run: docker save --output /tmp/bmstu_2024-app.tar bmstu_2024-app
- name: Upload image
uses: actions/upload-artifact@v4
with:
name: bmstu_2024-app
path: /tmp/bmstu_2024-app.tar
- name: Clear
run: make ci-clear
codestyle:
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Prepare
run: cp ./.env.example ./.env.dev
- name: Download image
uses: actions/download-artifact@v4
with:
name: bmstu_2024-app
path: /tmp
- name: Load container
run: docker load --input /tmp/bmstu_2024-app.tar
- name: Check codestyle
run: make ci-rubocop
- name: Clear
run: make ci-clear
# healthcheck:
# runs-on: ubuntu-latest
# needs: build
# steps:
# - name: Checkout code
# uses: actions/checkout@v4
# - name: Prepare
# run: cp ./.env.example ./.env.dev
# - name: Download image
# uses: actions/download-artifact@v4
# with:
# name: bmstu_2024-app
# path: /tmp
# - name: Load container
# run: docker load --input /tmp/bmstu_2024-app.tar
# - name: Healthcheck
# run: make ci-up-healthy