Skip to content

Commit b17749a

Browse files
author
Dieter Baier
committed
Initial setup with github action
1 parent c0a8064 commit b17749a

File tree

3 files changed

+98
-0
lines changed

3 files changed

+98
-0
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Build Docs
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
workflow_dispatch:
7+
8+
jobs:
9+
build-image:
10+
runs-on: ubuntu-latest
11+
outputs:
12+
image_name: ${{ steps.setImageName.outputs.IMAGE_NAME }}
13+
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- name: Set image name
18+
id: setImageName
19+
run: |
20+
echo "IMAGE_NAME_LATEST=ghcr.io/${{ github.repository_owner }}/docs-toolbox:latest" >> $GITHUB_OUTPUT
21+
22+
- name: Login to GHCR
23+
run: echo "${{ secrets.GHCR_PAT }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
24+
25+
- name: Set up QEMU
26+
uses: docker/setup-qemu-action@v3
27+
28+
- name: Set up Docker Buildx
29+
uses: docker/setup-buildx-action@v3
30+
31+
- name: Build (or reuse cache) and push image
32+
run: |
33+
docker buildx build \
34+
--platform linux/amd64,linux/arm64 \
35+
-t ${{ steps.setImageName.outputs.IMAGE_NAME_LATEST }} \
36+
--cache-from=type=registry,ref=${{ steps.setImageName.outputs.IMAGE_NAME_LATEST }} \
37+
--cache-to=type=registry,ref=${{ steps.setImageName.outputs.IMAGE_NAME_LATEST }},mode=max \
38+
--push .

.gitignore

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
.gradle
2+
build/
3+
!gradle/wrapper/gradle-wrapper.jar
4+
!**/src/main/**/build/
5+
!**/src/test/**/build/
6+
7+
### IntelliJ IDEA ###
8+
.idea/modules.xml
9+
.idea/jarRepositories.xml
10+
.idea/compiler.xml
11+
.idea/libraries/
12+
*.iws
13+
*.iml
14+
*.ipr
15+
out/
16+
!**/src/main/**/out/
17+
!**/src/test/**/out/
18+
19+
### Eclipse ###
20+
.apt_generated
21+
.classpath
22+
.factorypath
23+
.project
24+
.settings
25+
.springBeans
26+
.sts4-cache
27+
bin/
28+
!**/src/main/**/bin/
29+
!**/src/test/**/bin/
30+
31+
### NetBeans ###
32+
/nbproject/private/
33+
/nbbuild/
34+
/dist/
35+
/nbdist/
36+
/.nb-gradle/
37+
38+
### VS Code ###
39+
.vscode/
40+
41+
### Mac OS ###
42+
.DS_Store

Dockerfile

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# ---------------------------
2+
# Base Image: Java + Tools
3+
# ---------------------------
4+
FROM openjdk:22-jdk-slim
5+
6+
# Install system dependencies
7+
RUN apt-get update && apt-get install -y \
8+
pandoc \
9+
graphviz \
10+
unzip \
11+
curl \
12+
&& rm -rf /var/lib/apt/lists/*
13+
14+
# Arbeitsverzeichnis
15+
WORKDIR /app
16+
17+
# Flexible entrypoint – beliebige Commands
18+
ENTRYPOINT []

0 commit comments

Comments
 (0)