-
Notifications
You must be signed in to change notification settings - Fork 0
126 lines (114 loc) · 3.26 KB
/
ci_job.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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
name: CLI Test
run-name: ${{ github.actor }} is testing the cli 🧉
on: [push, workflow_call]
jobs:
linting-and-testing:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: "3.11"
-
name: Install packages
run: |
python3 -m pip install tox
mkdir .mypy_cache
-
name: Running tests with tox
run: tox -p 3 --parallel-no-spinner
deployment-image-linux:
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
steps:
-
name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
-
name: Set up Python 3.X
uses: actions/setup-python@v4
with:
python-version: "3.X"
-
name: Get tag
id: repository
run: |
echo "tag=$(python src/freva_deployment/__init__.py -v)" >> $GITHUB_OUTPUT
-
name: Set up QEMU
uses: docker/setup-qemu-action@v2
with:
platforms: all
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
install: true
-
name: Create Buildx builder
run: docker buildx create --use --name mybuilder --driver docker-container
-
name: Inspect Buildx builder
run: docker buildx inspect --bootstrap
-
name: Log in to the Container registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
-
name: Build and push deployment image
uses: docker/build-push-action@v4
with:
push: true
build-args: VERSION=${{steps.repository.outputs.tag}}
tags: |
ghcr.io/freva-clint/freva-deployment:${{ steps.repository.outputs.tag }}
ghcr.io/freva-clint/freva-deployment:latest
platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6,linux/ppc64le,linux/i386
vault-test:
name: Simple functional tests for the vault image
runs-on: ubuntu-latest
strategy:
matrix:
include:
- arch: linux/amd64
- arch: linux/arm64
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
with:
platforms: all
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
install: true
- name: Create Buildx builder
run: docker buildx create --use --name mybuilder --driver docker-container
- name: Inspect Buildx builder
run: docker buildx inspect --bootstrap
- name: Build vault image
uses: docker/build-push-action@v4
with:
context: assets/share/freva/deployment/vault/
platforms: ${{matrix.arch}}
push: false
load: true
tags: vault
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Check vault image
run: python3 assets/share/freva/deployment/vault/checks.py