Compare commits

...

6 Commits

Author SHA1 Message Date
1f6b0b5ac8 docs: add run instructions in README
All checks were successful
Build and Push Docker Image / docker-build (push) Successful in 11s
2025-11-26 10:35:00 +00:00
a2b2bb3b2f docs: add README
All checks were successful
Build and Push Docker Image / docker-build (push) Successful in 12s
2025-11-26 10:31:43 +00:00
8c32c54b7f ci: fix variables
All checks were successful
Build and Push Docker Image / docker-build (push) Successful in 23s
2025-11-26 10:14:05 +00:00
4f4802a529 ci: fix docker image
Some checks failed
Build and Push Docker Image / docker-build (push) Failing after 1m42s
2025-11-26 10:11:34 +00:00
434ca8a4be Merge pull request 'ci: add docker build action' (#2) from ci/docker-build into main
Some checks failed
Build and Push Docker Image / docker-build (push) Has been cancelled
Reviewed-on: #2
2025-11-26 10:05:17 +00:00
e330405c4f ci: add docker build action 2025-11-26 10:03:58 +00:00
2 changed files with 62 additions and 0 deletions

View File

@@ -0,0 +1,36 @@
name: Build and Push Docker Image
on:
push:
branches:
- main
jobs:
docker-build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up variables
run: |
IMAGE="${{ secrets.REGISTRY_URL }}/${{ secrets.REGISTRY_USERNAME }}/flingue-website"
SHA_TAG=$(echo "${GITHUB_SHA}" | cut -c1-7)
echo "IMAGE=$IMAGE" >> $GITHUB_ENV
echo "SHA_TAG=$SHA_TAG" >> $GITHUB_ENV
- name: Log in to Gitea Container Registry
run: |
echo "${{ secrets.REGISTRY_PASSWORD }}" | docker login \
-u "${{ secrets.REGISTRY_USERNAME }}" \
--password-stdin "${{ secrets.REGISTRY_URL }}"
- name: Build Docker image
run: |
docker build -t "$IMAGE:latest" -t "$IMAGE:${SHA_TAG}" .
- name: Push Docker image
run: |
docker push "$IMAGE:latest"
docker push "$IMAGE:${SHA_TAG}"

26
README.md Normal file
View File

@@ -0,0 +1,26 @@
![Docker build pipeline badge](https://git.lucaasmth.me/lucas.mathieu/flingue-website/actions/workflows/docker-build.yml/badge.svg)
# Flingue Website
## Description
Small static website served by an Nginx container.
## How to run
### With docker run
```bash
docker run -p 8080:80 git.lucaasmth.me/lucas.mathieu/flingue-website:latest
```
### With docker compose
```yaml
services:
flingue-website:
image: git.lucaasmth.me/lucas.mathieu/flingue-website:latest
ports:
- 8080:80
```