-
-
Notifications
You must be signed in to change notification settings - Fork 10
86 lines (84 loc) · 2.23 KB
/
server-cicd.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
86
name: Server CI/CD
on:
pull_request:
branches: [main]
types: [opened, reopened, synchronize]
push:
branches: [main]
workflow_dispatch:
jobs:
tests:
runs-on: ubuntu-latest
steps:
- name: Setup | Checkout
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
- name: Setup | Rust
uses: actions-rust-lang/[email protected]
with:
toolchain: stable
components: clippy
cache: false
- name: Setup | Rust-Cache
uses: Swatinem/rust-cache@v2
with:
workspaces: |
server
- name: Setup | Setup Git to run feedback unit-tests
run: |
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
- run: cargo test --workspace
working-directory: server
linting:
runs-on: ubuntu-latest
steps:
- name: Setup | Checkout
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
- name: Setup | Rust
uses: actions-rust-lang/[email protected]
with:
toolchain: stable
cache: false
- name: Setup | Rust-Cache
uses: Swatinem/rust-cache@v2
with:
workspaces: |
server
- run: cargo clippy --workspace
working-directory: server
server-build:
uses: ./.github/workflows/_docker-build.yml
needs:
- tests
- linting
with:
image_suffix: server
context: ./server
dockerfile: Dockerfile
permissions:
contents: read
packages: write
feedback-deployment:
uses: ./.github/workflows/_restart-argocd.yml
needs:
- server-build
with:
deployment: feedback
secrets:
ARGOCD_TOKEN: ${{ secrets.ARGOCD_TOKEN }}
calendar-deployment:
uses: ./.github/workflows/_restart-argocd.yml
needs:
- server-build
with:
deployment: calendar
secrets:
ARGOCD_TOKEN: ${{ secrets.ARGOCD_TOKEN }}
server-deployment:
uses: ./.github/workflows/_restart-argocd.yml
needs:
- server-build
with:
deployment: server
secrets:
ARGOCD_TOKEN: ${{ secrets.ARGOCD_TOKEN }}