Compare commits

...
Sign in to create a new pull request.

2 commits

Author SHA1 Message Date
Hadrien
564a22abb2 manual ci script + no cache for map updates
Some checks failed
/ build (push) Failing after 5m47s
2026-07-03 23:33:48 +02:00
a5cf3640dd Merge pull request 'Ajout de la radio de l'Interhack' (#62) from feat/radio into main
Some checks failed
/ build (push) Failing after 1m17s
Reviewed-on: #62
2026-07-02 10:55:21 +00:00
5 changed files with 58 additions and 10 deletions

View file

@ -13,10 +13,9 @@ jobs:
run: | run: |
echo "${{ secrets.DOCKER_PASSWORD }}" | podman login git.interhacker.space --username "${{ secrets.DOCKER_USERNAME }}" --password-stdin echo "${{ secrets.DOCKER_PASSWORD }}" | podman login git.interhacker.space --username "${{ secrets.DOCKER_USERNAME }}" --password-stdin
- name: Build Container Image - name: Build and Push Container Image
run: | run: |
trap 'rm -f dist.zip' EXIT
wget -q -O dist.zip https://git.interhacker.space/epickiwi/2026.camp.carte/releases/download/latest/dist.zip
podman build -t git.interhacker.space/interhack/camp-website-2026:latest . podman build -t git.interhacker.space/interhack/camp-website-2026:latest .
- name: Push Container Image
run: |
podman push git.interhacker.space/interhack/camp-website-2026:latest podman push git.interhacker.space/interhack/camp-website-2026:latest

1
.gitignore vendored
View file

@ -1 +1,2 @@
guide.html guide.html
dist.zip

View file

@ -1,13 +1,12 @@
FROM docker.io/nginx:1.29-alpine FROM docker.io/nginx:1.29-alpine
RUN apk add --update --no-cache wget unzip bash pandoc sed RUN apk add --update --no-cache unzip bash pandoc sed
RUN wget -q https://git.interhacker.space/epickiwi/2026.camp.carte/releases/download/latest/dist.zip COPY dist.zip /tmp/dist.zip
RUN unzip -q dist.zip -d /tmp/carte RUN unzip -q /tmp/dist.zip -d /tmp/carte
RUN mkdir -p /usr/share/nginx/html/carte RUN mkdir -p /usr/share/nginx/html/carte
RUN cp -r /tmp/carte/dist/* /usr/share/nginx/html/carte/ RUN cp -r /tmp/carte/dist/* /usr/share/nginx/html/carte/
RUN rm -rf /tmp/carte RUN rm -rf /tmp/carte /tmp/dist.zip
RUN rm -rf dist.zip
COPY guide.template.html . COPY guide.template.html .
COPY update-guide.sh . COPY update-guide.sh .

View file

@ -40,11 +40,13 @@ First, login to the Docker registry:
docker login git.interhacker.space docker login git.interhacker.space
``` ```
Then, build and push to the registry: Then, download the map bundle, build and push to the registry:
```bash ```bash
wget -q -O dist.zip https://git.interhacker.space/epickiwi/2026.camp.carte/releases/download/latest/dist.zip
docker build -t git.interhacker.space/interhack/camp-website-2026:latest . docker build -t git.interhacker.space/interhack/camp-website-2026:latest .
docker push git.interhacker.space/interhack/camp-website-2026:latest docker push git.interhacker.space/interhack/camp-website-2026:latest
rm -f dist.zip
``` ```
The pull process is triggered every five minutes. The pull process is triggered every five minutes.

47
manual-ci.sh Executable file
View file

@ -0,0 +1,47 @@
#!/usr/bin/env bash
set -euo pipefail
IMAGE="git.interhacker.space/interhack/camp-website-2026:latest"
REGISTRY="git.interhacker.space"
need_cmd() {
command -v "$1" >/dev/null 2>&1 || {
echo "Missing required command: $1" >&2
exit 1
}
}
need_cmd bash
need_cmd wget
need_cmd pandoc
need_cmd docker
if [[ ! -x ./update-guide.sh ]]; then
echo "Missing or non-executable ./update-guide.sh" >&2
exit 1
fi
echo "==> Generating guide.html"
bash ./update-guide.sh
trap 'rm -f dist.zip' EXIT
echo "==> Downloading map bundle"
wget -q -O dist.zip https://git.interhacker.space/epickiwi/2026.camp.carte/releases/download/latest/dist.zip
echo "==> Logging in to ${REGISTRY}"
if [[ -n "${DOCKER_USERNAME:-}" && -n "${DOCKER_PASSWORD:-}" ]]; then
printf '%s' "$DOCKER_PASSWORD" | docker login "$REGISTRY" --username "$DOCKER_USERNAME" --password-stdin
else
docker login "$REGISTRY"
fi
echo "==> Building image: ${IMAGE}"
docker build --no-cache -t "$IMAGE" .
echo "==> Pushing image: ${IMAGE}"
docker push "$IMAGE"
rm -f dist.zip
echo "Done."