From ddb6de26bf4f7fdde2f14c5ed6c67586238e35d8 Mon Sep 17 00:00:00 2001 From: Lucas Winther Date: Mon, 9 Nov 2026 08:20:50 +0100 Subject: [PATCH] chore(docker,ci): bump nginx to 1.30.6-trixie and migrate CI to Gitea registry --- .gitea/workflows/ci.yml | 47 ++++++++++++++++++++++++++++++++++++++ .github/workflows/main.yml | 37 ------------------------------ Dockerfile | 2 +- 3 files changed, 48 insertions(+), 38 deletions(-) create mode 100644 .gitea/workflows/ci.yml delete mode 100644 .github/workflows/main.yml diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml new file mode 100644 index 0000000..f99800f --- /dev/null +++ b/.gitea/workflows/ci.yml @@ -0,0 +1,47 @@ +name: Continuous Integration + +on: + push: + branches: [master] + tags: ['v*'] + pull_request: + branches: [master] + +env: + REGISTRY: gitea.lucaswinther.info + +jobs: + docker-build-and-push: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + # Gitea's job token cannot publish packages; use a package-write PAT. + - name: Log in to Gitea Container Registry + if: gitea.event_name != 'pull_request' + uses: docker/login-action@v3 + with: + registry: ${{ env.REGISTRY }} + username: lucasw89 + password: ${{ secrets.REGISTRY_TOKEN }} + + - name: Extract Docker metadata + id: meta + uses: docker/metadata-action@v5 + with: + images: ${{ env.REGISTRY }}/${{ gitea.repository }} + tags: | + type=raw,value=latest,enable={{is_default_branch}} + type=ref,event=branch + type=semver,pattern={{version}} + type=sha,prefix=sha- + + - name: Build and push Docker image + uses: docker/build-push-action@v6 + with: + context: . + push: ${{ gitea.event_name != 'pull_request' }} + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml deleted file mode 100644 index 7d3746b..0000000 --- a/.github/workflows/main.yml +++ /dev/null @@ -1,37 +0,0 @@ -# This is a basic workflow to help you get started with Actions - -name: CI - -# Controls when the action will run. -on: - # Triggers the workflow on push or pull request events but only for the master branch - push: - branches: [ master ] - # Allows you to run this workflow manually from the Actions tab - workflow_dispatch: - -# A workflow run is made up of one or more jobs that can run sequentially or in parallel -jobs: - # This workflow contains a single job called "build" - build: - # The type of runner that the job will run on - runs-on: ubuntu-latest - - # Steps represent a sequence of tasks that will be executed as part of the job - steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v2 - - - name: Login to Docker Hub - uses: docker/login-action@v1 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - - name: Publish changed images - uses: dawidd6/action-docker-publish-changed@v3 - with: - username: ${{secrets.DOCKERHUB_USERNAME}} - password: ${{secrets.DOCKERHUB_TOKEN}} - platforms: linux/amd64,linux/arm64,linux/arm - tag: latest diff --git a/Dockerfile b/Dockerfile index 1410c0d..1a7decb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,2 +1,2 @@ -FROM nginx:latest +FROM nginx:1.30.6-trixie COPY /. /usr/share/nginx/html