diff --git a/.github/workflows/build_caddy.yml b/.github/workflows/build_caddy.yml new file mode 100644 index 0000000..db8181b --- /dev/null +++ b/.github/workflows/build_caddy.yml @@ -0,0 +1,68 @@ +# SPDX-FileCopyrightText: 2026 Marlon W (Mawoka) +# +# SPDX-License-Identifier: MPL-2.0 + +name: "[CI] Build" + +on: + workflow_dispatch: + push: + branches: [master] + paths: + - ".github/workflows/build_caddy.yml" + - "Caddyfile-docker" + - "Dockerfile.caddy" +# pull_request: + +env: + # Use docker.io for Docker Hub if empty + REGISTRY: ghcr.io + # github.repository as / + IMAGE_NAME: classquiz-caddy + +jobs: + build: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + # This is used to complete the identity challenge + # with sigstore/fulcio when running outside of PRs. + id-token: write + + steps: + - name: Checkout repository + uses: actions/checkout@v6 + + # Workaround: https://github.com/docker/build-push-action/issues/461 + - name: Setup Docker buildx + uses: docker/setup-buildx-action@v4 + + # Login against a Docker registry except on PR + # https://github.com/docker/login-action + - name: Log into registry ${{ env.REGISTRY }} + if: github.event_name != 'pull_request' + uses: docker/login-action@v4 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + # Extract metadata (tags, labels) for Docker + # https://github.com/docker/metadata-action + - name: Extract Docker metadata + id: meta + uses: docker/metadata-action@v6 + with: + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + + # Build and push Docker image with Buildx (don't push on PR) + # https://github.com/docker/build-push-action + - name: Build and push Docker image + id: build-and-push + uses: docker/build-push-action@v7 + with: + push: ${{ github.event_name != 'pull_request' }} + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + platforms: linux/arm64 diff --git a/Dockerfile.caddy b/Dockerfile.caddy new file mode 100644 index 0000000..4f9ca62 --- /dev/null +++ b/Dockerfile.caddy @@ -0,0 +1,5 @@ +# SPDX-FileCopyrightText: 2026 Marlon W (Mawoka) +# +# SPDX-License-Identifier: MPL-2.0 +FROM caddy:alpine +COPY Caddyfile-docker /etc/caddy/Caddyfile diff --git a/migration_to_rust.md b/migration_to_rust.md deleted file mode 100644 index d1f26b0..0000000 --- a/migration_to_rust.md +++ /dev/null @@ -1,8 +0,0 @@ - - -# Migration of the Backend to Rust (long term goal)