-
Notifications
You must be signed in to change notification settings - Fork 0
67 lines (57 loc) · 1.68 KB
/
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
57
58
59
60
61
62
63
64
65
66
67
name: Build and Publish
on:
release:
types: [published]
jobs:
build_and_test:
runs-on: ubuntu-latest
env:
ARTIFACTORY_USERNAME: build_server
ARTIFACTORY_TOKEN: ${{ secrets.ARTIFACTORY_TOKEN }}
steps:
- uses: actions/checkout@v3
- name: Create Conan Cache
run: docker volume create ConanCache
- name: Cache Artifacts
id: cache-primes
uses: actions/cache@v3
with:
path: /var/lib/docker/volumes/ConanCache
key: $(docker compose -f bin/docker-compose.yml run --rm bash conan profile show)
- name: Generate MASL
run: |
cd models/
./gen_all.sh
- name: Load .env
id: dotenv
uses: falti/dotenv-action@v1.1
with:
path: bin/.env
log-variables: true
export-variables: true
- name: Build and Publish
env:
MUNIN_VERSION: ${{ github.ref_name }}
run: |
cd models/
./publish_all.sh
- uses: docker/setup-buildx-action@v2
- uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Generate docker metadata
id: meta
uses: docker/metadata-action@v4
with:
images: ghcr.io/xtuml/protocol_verifier
- name: Build/push image
uses: docker/build-push-action@v3
with:
context: bin/docker
build-args: |
MASL_VERSION=${{ steps.dotenv.outputs.masl_version }}
MUNIN_VERSION=${{ github.ref_name }}
tags: ${{ steps.meta.outputs.tags }}
push: true