Skip to content

Commit b888b64

Browse files
committed
github actions
1 parent 037dade commit b888b64

File tree

1 file changed

+55
-0
lines changed

1 file changed

+55
-0
lines changed

.github/workflows/publish-ghcr.yaml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Docker Image CI
2+
3+
on:
4+
release:
5+
types: [published]
6+
workflow_dispatch:
7+
8+
env:
9+
REGISTRY: ghcr.io
10+
11+
jobs:
12+
build-and-push-image:
13+
runs-on: ubuntu-latest
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
include:
18+
- dockerfile: ./api/Dockerfile
19+
image: ghcr.io/MI-FraunhoferIWM/json2rdf
20+
context: ./api
21+
- dockerfile: ./yarrrml-parser/Dockerfile
22+
image: ghcr.io/MI-FraunhoferIWM/yarrrml-parser
23+
context: ./yarrrml-parser
24+
- dockerfile: ./rmlmapper-webapi/Dockerfile
25+
image: ghcr.io/MI-FraunhoferIWM/rmlmapper
26+
context: ./rmlmapper-webapi
27+
permissions:
28+
contents: read
29+
packages: write
30+
31+
steps:
32+
- name: Checkout repository
33+
uses: actions/checkout@v4
34+
35+
- name: Log in to the Container registry
36+
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
37+
with:
38+
registry: ${{ env.REGISTRY }}
39+
username: ${{ github.actor }}
40+
password: ${{ secrets.GHP }}
41+
42+
- name: Extract metadata (tags, labels) for Docker
43+
id: meta
44+
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
45+
with:
46+
images: ${{ matrix.image }}
47+
48+
- name: Build and push Docker image
49+
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
50+
with:
51+
context: ${{ matrix.context }}
52+
file: ${{ matrix.dockerfile }}
53+
push: true
54+
tags: ${{ steps.meta.outputs.tags }}
55+
labels: ${{ steps.meta.outputs.labels }}

0 commit comments

Comments
 (0)