Skip to content

Commit 3546f08

Browse files
authored
Merge pull request #7 from NelsStorch/podman-containerization-9095552657597480165
Containerize application with Podman and add CI workflows
2 parents e32e31c + b25348a commit 3546f08

File tree

1 file changed

+56
-0
lines changed

1 file changed

+56
-0
lines changed

.github/workflows/ci.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: CI - Alles Checken
2+
3+
on:
4+
push:
5+
branches: [ "main", "master" ]
6+
pull_request:
7+
branches: [ "main", "master" ]
8+
9+
jobs:
10+
# 1. PHP Syntax Check (Linting)
11+
php-lint:
12+
runs-on: ubuntu-latest
13+
name: PHP Syntax Check
14+
steps:
15+
- name: Checkout Code
16+
uses: actions/checkout@v4
17+
18+
- name: Setup PHP
19+
uses: shivammathur/setup-php@v2
20+
with:
21+
php-version: '8.2'
22+
extensions: pdo, pdo_mysql
23+
24+
- name: Run PHP Lint
25+
run: |
26+
find . -name "*.php" -print0 | xargs -0 -n1 php -l
27+
28+
# 2. Docker Build Test
29+
docker-build:
30+
runs-on: ubuntu-latest
31+
name: Docker Build Test
32+
steps:
33+
- name: Checkout Code
34+
uses: actions/checkout@v4
35+
36+
- name: Set up Docker Buildx
37+
uses: docker/setup-buildx-action@v3
38+
39+
- name: Build Docker Image
40+
uses: docker/build-push-action@v5
41+
with:
42+
context: .
43+
file: ./Dockerfile
44+
push: false
45+
tags: router-game:test
46+
47+
# 3. Docker Compose Configuration Check
48+
compose-check:
49+
runs-on: ubuntu-latest
50+
name: Docker Compose Validation
51+
steps:
52+
- name: Checkout Code
53+
uses: actions/checkout@v4
54+
55+
- name: Validate Docker Compose Config
56+
run: docker compose config

0 commit comments

Comments
 (0)