From 6ebc360d1baa935953d64d0c6428fa4e1a90fa60 Mon Sep 17 00:00:00 2001 From: Timothy Schenk Date: Thu, 16 Nov 2023 07:29:36 +0100 Subject: [PATCH] ci: simple image setup --- .gitea/workflows/server.yaml | 43 ++++++++++++++++++++++++++++++++++++ Wiki.Dockerfile | 2 ++ 2 files changed, 45 insertions(+) create mode 100644 Wiki.Dockerfile diff --git a/.gitea/workflows/server.yaml b/.gitea/workflows/server.yaml index a1b18b3..f93f9b7 100644 --- a/.gitea/workflows/server.yaml +++ b/.gitea/workflows/server.yaml @@ -66,6 +66,49 @@ jobs: path: artifacts/${{ env.ALGOLIA_ARTIFACT }} retention-days: 14 + build-docs-container: + runs-on: ubuntu-latest + container: catthehacker/ubuntu:act-latest + needs: [ docs ] + steps: + - name: Checkout repository + uses: https://github.com/actions/checkout@v3 + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + registry: ${{ github.server_url }} + username: ${{ github.actor }} + password: ${{ secrets.REGISTRY_TOKEN }} + - name: Retrieve docs artifact + uses: actions/download-artifact@v2 + with: + name: wiki.zip + - name: Unzip wiki.zip into .public + run: | + mkdir .public + unzip wiki.zip -d .public + - name: Build and push + uses: docker/build-push-action@v5 + with: + context: . + file: Wiki.Dockerfile + push: true + tags: forge.rainote.dev/${{ github.repository }}:${{ needs.preprocess.outputs.sanitized_branch_name }}-wiki + platforms: linux/amd64,linux/arm64 + - name: Build and push to latest + if: github.ref_name == 'master' + uses: docker/build-push-action@v5 + with: + context: . + file: Wiki.Dockerfile + push: true + tags: forge.rainote.dev/${{ github.repository }}:latest-wiki + platforms: linux/amd64, linux/arm64 + build: runs-on: ubuntu-latest steps: diff --git a/Wiki.Dockerfile b/Wiki.Dockerfile new file mode 100644 index 0000000..eb4f5a6 --- /dev/null +++ b/Wiki.Dockerfile @@ -0,0 +1,2 @@ +FROM nginx +COPY .public /usr/share/nginx/html