This repository was archived by the owner on Feb 9, 2026. It is now read-only.
forked from merlot-education/omejdn-plugins
-
Notifications
You must be signed in to change notification settings - Fork 2
78 lines (69 loc) · 2.58 KB
/
continious_integration.yaml
File metadata and controls
78 lines (69 loc) · 2.58 KB
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
# Copyright 2024-2025 Dataport. All rights reserved. Developed as part of the POSSIBLE project.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: Build and Deploy EDC to Cluster
on:
push:
branches: [ "develop", "main" ]
workflow_dispatch:
env:
REGISTRY: ghcr.io
REGISTRY_NAMESPACE: Dataport
K8S_NAMESPACE: ${{ github.ref == 'refs/heads/main' && 'mvd-001-demo' || 'edc-dev' }}
jobs:
build-and-push-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Log in to the Container registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
buildkitd-flags: --debug
- name: Dev image tag
if: startsWith(github.ref, 'refs/heads/')
shell: bash {0}
run: |
tag="$(awk -F'"' '/"version": ".+"/{ print $4; exit; }' version)"
echo "tag=$tag" >> $GITHUB_ENV
echo "environment=dev" >> $GITHUB_ENV
- name: Docker meta
id: docker-meta-data
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.REGISTRY_NAMESPACE }}/omejdn
tags: |
type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main'}}
type=raw,value=${{env.tag}},enable=${{ github.ref == 'refs/heads/main'}}
type=raw,value=latest-${{github.ref_name }},enable=${{ github.ref != 'refs/heads/main'}}
${{ github.sha }}
- name: Build and push "management"
id: build_and_push_management
uses: docker/build-push-action@v6
with:
context: .
file: ./Dockerfile
push: true
tags: ${{ steps.docker-meta-data.outputs.tags }}
labels: ${{ steps.management-meta.outputs.labels }}
build-args: |
ENVIRONMENT=${{ env.environment }}