Compare commits

...

2 Commits

Author SHA1 Message Date
42a1e11c3d Ajout du favicon
All checks were successful
/ 🐳 Build & Push Docker Image with Commit Hash Tag (push) Successful in 2m41s
2025-07-09 20:17:38 +02:00
fd5ba8443c Add CI workflow 2025-07-09 20:17:38 +02:00
5 changed files with 66 additions and 0 deletions

1
.dockerignore Normal file
View File

@ -0,0 +1 @@
Dockerfile

View File

@ -0,0 +1,38 @@
on:
push:
branches:
- master
workflow_dispatch:
jobs:
build-and-push:
name: 🐳 Build & Push Docker Image with Commit Hash Tag
runs-on: docker
steps:
- name: 📦 Cloner le dépôt
uses: actions/checkout@v3
- name: ⚙️ Récupérer le hash court du commit
id: vars
run: echo "COMMIT_HASH=$(git rev-parse --short HEAD)" >> $GITEA_OUTPUT
- name: 🔐 Connexion au registre Docker (Gitea)
uses: docker/login-action@v3
with:
registry: ${{ vars.REGISTRY_URL }}
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- name: ⚙️ Préparer Buildx
uses: docker/setup-buildx-action@v3
- name: 🐳 Construire & pousser limage avec Buildx
uses: docker/build-push-action@v6
with:
context: .
push: true
tags: |
${{ vars.REGISTRY_URL }}/${{ vars.REGISTRY_REPOSITORY }}:${{ steps.vars.outputs.COMMIT_HASH }}
${{ vars.REGISTRY_URL }}/${{ vars.REGISTRY_REPOSITORY }}:latest
platforms: linux/amd64

26
Dockerfile Normal file
View File

@ -0,0 +1,26 @@
FROM php:8-apache
WORKDIR /var/www/html
COPY . .
ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/
RUN chmod +x /usr/local/bin/install-php-extensions
RUN install-php-extensions imagick
RUN docker-php-ext-enable imagick
RUN apt-get update && apt-get install -y ffmpeg git wget unzip vim
RUN wget https://use.fontawesome.com/releases/v5.15.1/fontawesome-free-5.15.1-web.zip
RUN unzip fontawesome-free-5.15.1-web.zip
RUN rm fontawesome-free-5.15.1-web.zip
RUN mv fontawesome-free-5.15.1-web /var/www/html/fontawesome
COPY --from=composer/composer:latest-bin /composer /usr/bin/composer
WORKDIR /var/www/html/php
RUN composer require php-ffmpeg/php-ffmpeg
RUN install -d -m 0755 -o www-data -g www-data /var/www/html/uploads

BIN
favicon_transfer.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

View File

@ -5,6 +5,7 @@
<link href="/fontawesome/css/all.css" rel="stylesheet" />
<link rel="stylesheet" href="style/imagepreview.css"/>
<link href="style/style.css" rel="stylesheet">
<link rel="icon" href="favicon_transfer.png" type="image/png">
<title>Local Transfer</title>
</head>
<body>