-
Notifications
You must be signed in to change notification settings - Fork 1
56 lines (49 loc) · 1.49 KB
/
test-and-build.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
name: littr CI/CD test and build pipeline
on:
workflow_dispatch:
push:
tags:
- 'v0.*'
- 'v1.*'
jobs:
# unit:
# runs-on: ${{ secrets.RUNNER_LABELS }}
# steps:
# - uses: actions/checkout@v4
# - name: Run unit/integration tests.
# env:
# HOSTNAME: ${{ vars.HOSTNAME }}
# run: make unit
build:
runs-on: ${{ vars.RUNNER_LABELS_BUILD }}
steps:
- uses: actions/checkout@v4
- name: Build new swapi image (with staging).
env:
APP_PEPPER: ${{ secrets.APP_PEPPER }}
APP_URLS_TRAEFIK: ${{ secrets.APP_URLS_TRAEFIK }}
DOCKER_CONTAINER_NAME: ${{ secrets.DOCKER_CONTAINER_NAME }}
DOCKER_NETWORK_NAME: ${{ secrets.DOCKER_NETWORK_NAME }}
REGISTRY: ${{ secrets.REGISTRY }}
REGISTRY_USER: ${{ secrets.REGISTRY_USER }}
REGISTRY_PASSWORD: ${{ secrets.REGISTRY_PASSWORD }}
VAPID_PUB_KEY: ${{ secrets.VAPID_PUB_KEY }}
run: make build
push:
runs-on: ${{ vars.RUNNER_LABELS_BUILD }}
needs: [ build ]
steps:
- uses: actions/checkout@v4
- name: Push the image to registry.
env:
REGISTRY: ${{ secrets.REGISTRY }}
REGISTRY_USER: ${{ secrets.REGISTRY_USER }}
REGISTRY_PASSWORD: ${{ secrets.REGISTRY_PASSWORD }}
run: make push_to_registry
generate_docs:
runs-on: ${{ vars.RUNNER_LABELS_BUILD }}
needs: [ build ]
steps:
- uses: actions/checkout@v4
- name: (re)Generate interface API swagger docs.
run: make docs