-
Notifications
You must be signed in to change notification settings - Fork 5
77 lines (73 loc) · 2.51 KB
/
deploy-docker-images.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
# SPDX-FileCopyrightText: Copyright DB InfraGO AG and contributors
# SPDX-License-Identifier: CC0-1.0
name: Build & push images
on:
push:
pull_request:
branches: ['main']
env:
registry: ghcr.io/dsd-dbs/capella-dockerimages/
images: capella/base capella/remote
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install pre-commit
run: |-
python -m pip install 'pre-commit'
- name: Run pre-commit
run: |-
pre-commit run --all-files
deploy-docker-images:
runs-on: ubuntu-latest
needs: [lint]
strategy:
matrix:
capella_version:
- '5.0.0'
- '5.2.0'
- '6.0.0'
- '6.1.0'
- '7.0.0'
dropins:
- name: 'without'
dropins: 'ModelsImporter'
- name: 'selected'
dropins: 'ModelsImporter,CapellaXHTMLDocGen,DiagramStyler,PVMT,Filtering,Requirements,SubsystemTransition'
name:
Capella ${{ matrix.capella_version }} with ${{ matrix.dropins.name }}
dropins
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Login to github container registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set outputs
id: tag
run: |
echo "branch=$(echo $GITHUB_REF_NAME | sed 's/[^a-zA-Z0-9.]/-/g')" >> "$GITHUB_OUTPUT"
echo "sha=$(git rev-parse --short HEAD)" >> "$GITHUB_OUTPUT"
- name: Build
# prettier-ignore
run: >
make ${{ env.images }}
CAPELLA_DOWNLOAD_URL="https://mirror.umd.edu/eclipse/capella/core/products/releases/{}"
CAPELLA_VERSIONS="${{ matrix.capella_version }}"
DOCKER_PREFIX="${{ env.registry }}"
CAPELLA_DOCKERIMAGES_REVISION="${{ steps.tag.outputs.branch }}"
CAPELLA_DROPINS="${{ matrix.dropins.dropins }}"
DOCKER_TAG_SCHEMA=${{ matrix.capella_version }}-${{ matrix.dropins.name }}-dropins-${{ steps.tag.outputs.branch }}
DOCKER_BUILD_FLAGS="--label git-short-sha=${{ steps.tag.outputs.sha }}"
- name: Push
run: |
for image in ${{ env.images }}
do docker push "${{ env.registry }}$image:${{ matrix.capella_version }}-${{ matrix.dropins.name }}-dropins-${{ steps.tag.outputs.branch }}"
done